Package io.datarouter.storage.file
Class DirectoryManager
java.lang.Object
io.datarouter.storage.file.DirectoryManager
public class DirectoryManager
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDirectoryManager.DirectoryManagerFactory -
Constructor Summary
Constructors Constructor Description DirectoryManager(PathService pathService, Utf8SmallFileService utf8SmallFileService, java.lang.String rootPathString) -
Method Summary
Modifier and Type Method Description DirectoryManagercreateSubdirectory(java.lang.String name)DirectoryManagerdelete(java.lang.String relativePathString)voiddeleteAll()This DirectoryManager object will become unusable and need to be recreatedDirectoryManagerdeleteDescendants()booleanexists(java.lang.String relativePathString)java.lang.StringreadUtf8(java.lang.String relativePathString)io.datarouter.scanner.Scanner<java.nio.file.Path>scanChildren(java.util.Set<java.lang.String> excluding, int limit, boolean sorted)io.datarouter.scanner.Scanner<java.nio.file.Path>scanDescendants(boolean includeDirectories, boolean sorted)java.lang.Longsize(java.lang.String relativePathString)DirectoryManagerwriteUtf8(java.lang.String relativePathString, java.lang.String contents)
-
Constructor Details
-
DirectoryManager
public DirectoryManager(PathService pathService, Utf8SmallFileService utf8SmallFileService, java.lang.String rootPathString)
-
-
Method Details
-
exists
public boolean exists(java.lang.String relativePathString) -
createSubdirectory
-
scanChildren
public io.datarouter.scanner.Scanner<java.nio.file.Path> scanChildren(java.util.Set<java.lang.String> excluding, int limit, boolean sorted) -
scanDescendants
public io.datarouter.scanner.Scanner<java.nio.file.Path> scanDescendants(boolean includeDirectories, boolean sorted) -
size
public java.lang.Long size(java.lang.String relativePathString) -
writeUtf8
-
readUtf8
public java.lang.String readUtf8(java.lang.String relativePathString) -
delete
-
deleteDescendants
-
deleteAll
public void deleteAll()This DirectoryManager object will become unusable and need to be recreated
-