Class FileAttributesChecker

java.lang.Object
org.elasticsearch.xpack.security.support.FileAttributesChecker

public class FileAttributesChecker extends Object
A utility for cli tools to capture file attributes before writing files, and to warn if the permissions/group/owner changes.
  • Constructor Details

    • FileAttributesChecker

      public FileAttributesChecker(Path... paths) throws IOException
      Create a checker for the given paths, which will warn to the given terminal if changes are made.
      Throws:
      IOException
  • Method Details

    • check

      public void check(Terminal terminal) throws IOException
      Check if attributes of the paths have changed, warning to the given terminal if they have.
      Throws:
      IOException