Class OperatorFiles.Snapshot

java.lang.Object
com.ultikits.ultitools.config.OperatorFiles.Snapshot
Enclosing class:
OperatorFiles

public static final class OperatorFiles.Snapshot extends Object
A file's text exactly as OperatorFiles.read(File) found it, and the fingerprint of its bytes. Only read creates one.
  • Field Details

    • file

      private final File file
    • text

      private final String text
    • fingerprint

      private final String fingerprint
  • Constructor Details

  • Method Details

    • getFile

      public File getFile()
      The file that was read, as an absolute path; OperatorFiles.write(Snapshot, Map) writes only this file.
      Returns:
      the file
    • getText

      public String getText()
      The file's text, decoded as strict UTF-8.
      Returns:
      the text
    • getFingerprint

      public String getFingerprint()
      The SHA-256 of the file's bytes, as 64 lower-case hexadecimal digits.
      Returns:
      the fingerprint