Class PackFileSnapshot

    • Field Detail

      • MISSING_CHECKSUM

        private static final ObjectId MISSING_CHECKSUM
      • wasChecksumChanged

        private boolean wasChecksumChanged
    • Constructor Detail

      • PackFileSnapshot

        PackFileSnapshot​(java.io.File packFile)
    • Method Detail

      • save

        public static PackFileSnapshot save​(java.io.File path)
        Record a snapshot for a specific packfile path.

        This method should be invoked before the packfile is accessed.

        Parameters:
        path - the path to later remember. The path's current status information is saved.
        Returns:
        the snapshot.
      • setChecksum

        void setChecksum​(AnyObjectId checksum)
      • isModified

        public boolean isModified​(java.io.File packFile)
        Check if the path may have been modified since the snapshot was saved.
        Overrides:
        isModified in class FileSnapshot
        Parameters:
        packFile - the path the snapshot describes.
        Returns:
        true if the path needs to be read again.
      • isChecksumChanged

        boolean isChecksumChanged​(java.io.File packFile)
      • readChecksum

        private AnyObjectId readChecksum​(java.io.File packFile)
      • wasChecksumChanged

        boolean wasChecksumChanged()