Package pro.gravit.launcher.hasher
Class HashedDir
- java.lang.Object
-
- pro.gravit.launcher.serialize.stream.StreamObject
-
- pro.gravit.launcher.hasher.HashedEntry
-
- pro.gravit.launcher.hasher.HashedDir
-
public final class HashedDir extends HashedEntry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHashedDir.Diffstatic classHashedDir.WalkActionstatic interfaceHashedDir.WalkCallback-
Nested classes/interfaces inherited from class pro.gravit.launcher.hasher.HashedEntry
HashedEntry.Type
-
Nested classes/interfaces inherited from class pro.gravit.launcher.serialize.stream.StreamObject
StreamObject.Adapter<O extends StreamObject>
-
-
Field Summary
-
Fields inherited from class pro.gravit.launcher.hasher.HashedEntry
flag
-
-
Constructor Summary
Constructors Constructor Description HashedDir()HashedDir(java.nio.file.Path dir, FileNameMatcher matcher, boolean allowSymlinks, boolean digest)HashedDir(HInput input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HashedDir.Diffcompare(HashedDir other, FileNameMatcher matcher)HashedDir.Diffdiff(HashedDir other, FileNameMatcher matcher)HashedEntrygetEntry(java.lang.String name)HashedEntry.TypegetType()booleanisEmpty()java.util.Map<java.lang.String,HashedEntry>map()voidremove(java.lang.String name)voidremoveR(java.lang.String name)HashedEntryresolve(java.lang.Iterable<java.lang.String> path)HashedDirsideCompare(HashedDir other, FileNameMatcher matcher, java.util.Deque<java.lang.String> path, boolean mismatchList)longsize()voidwalk(java.lang.CharSequence separator, HashedDir.WalkCallback callback)voidwrite(HOutput output)-
Methods inherited from class pro.gravit.launcher.serialize.stream.StreamObject
write
-
-
-
-
Constructor Detail
-
HashedDir
public HashedDir()
-
HashedDir
public HashedDir(HInput input) throws java.io.IOException
- Throws:
java.io.IOException
-
HashedDir
public HashedDir(java.nio.file.Path dir, FileNameMatcher matcher, boolean allowSymlinks, boolean digest) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
diff
public HashedDir.Diff diff(HashedDir other, FileNameMatcher matcher)
-
compare
public HashedDir.Diff compare(HashedDir other, FileNameMatcher matcher)
-
remove
public void remove(java.lang.String name)
-
removeR
public void removeR(java.lang.String name)
-
getEntry
public HashedEntry getEntry(java.lang.String name)
-
getType
public HashedEntry.Type getType()
- Specified by:
getTypein classHashedEntry
-
isEmpty
public boolean isEmpty()
-
map
public java.util.Map<java.lang.String,HashedEntry> map()
-
resolve
public HashedEntry resolve(java.lang.Iterable<java.lang.String> path)
-
sideCompare
public HashedDir sideCompare(HashedDir other, FileNameMatcher matcher, java.util.Deque<java.lang.String> path, boolean mismatchList)
-
size
public long size()
- Specified by:
sizein classHashedEntry
-
write
public void write(HOutput output) throws java.io.IOException
- Specified by:
writein classStreamObject- Throws:
java.io.IOException
-
walk
public void walk(java.lang.CharSequence separator, HashedDir.WalkCallback callback) throws java.io.IOException- Throws:
java.io.IOException
-
-