public class FilePathHashLoader extends Object implements FileHashLoader
FileHashLoader
that only hashes the files' paths without reading their contents.
If file's hash needs to be changed, for example to reflect changes to the file's contents, the file's path can be specified in a set of modified files. Files specified in this set will get new unique hashes based on their paths distinct from the hashes they would get if they were omitted from the set.
Constructor and Description |
---|
FilePathHashLoader(Path defaultCellRoot,
com.google.common.collect.ImmutableSet<Path> assumeModifiedFiles,
boolean allowSymlinks) |
Modifier and Type | Method and Description |
---|---|
com.google.common.hash.HashCode |
get(Path root) |
com.google.common.hash.HashCode |
getForArchiveMember(Path relativeArchivePath,
Path memberPath) |
long |
getSize(Path path) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get, getForArchiveMember, getSize
public FilePathHashLoader(Path defaultCellRoot, com.google.common.collect.ImmutableSet<Path> assumeModifiedFiles, boolean allowSymlinks) throws IOException
IOException
public com.google.common.hash.HashCode get(Path root) throws IOException
get
in interface FileHashLoader
IOException
public long getSize(Path path) throws IOException
getSize
in interface FileHashLoader
IOException
public com.google.common.hash.HashCode getForArchiveMember(Path relativeArchivePath, Path memberPath)
getForArchiveMember
in interface FileHashLoader