Package io.datarouter.filesystem.raw
Class DirectoryManager
java.lang.Object
io.datarouter.filesystem.raw.DirectoryManager
public class DirectoryManager extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDirectoryManager.DirectoryManagerFactory -
Constructor Summary
Constructors Constructor Description DirectoryManager(PathService pathService, BinaryFileService binaryFileService, Utf8SmallFileService utf8FileService, String rootPathString) -
Method Summary
Modifier and Type Method Description DirectoryManagercreateSubdirectory(io.datarouter.storage.util.Subpath subpath)DirectoryManagerdelete(String relativePathString)DirectoryManagerdeleteDescendants(io.datarouter.storage.util.Subpath subpath)booleanexists(String relativePathString)PathgetRoot()Optional<Long>length(String relativePathString)byte[]read(String relativePathString)byte[]read(String relativePathString, long offset, int length)StringreadUtf8(String relativePathString)io.datarouter.scanner.Scanner<Path>scanChildren(io.datarouter.storage.util.Subpath subpath, Set<String> excludingFilenames, int limit, boolean sorted)io.datarouter.scanner.Scanner<List<Path>>scanDescendantsPaged(io.datarouter.storage.util.Subpath subpath, boolean includeDirectories, boolean sorted)voidselfDestruct()This DirectoryManager object will become unusable and need to be recreatedLongsize(String relativePathString)DirectoryManagerwrite(String relativePathString, byte[] contents)DirectoryManagerwrite(String relativePathString, io.datarouter.scanner.Scanner<byte[]> chunks)DirectoryManagerwrite(String relativePathString, InputStream inputStream)DirectoryManagerwriteUtf8(String relativePathString, String contents)
-
Constructor Details
-
DirectoryManager
public DirectoryManager(PathService pathService, BinaryFileService binaryFileService, Utf8SmallFileService utf8FileService, String rootPathString)
-
-
Method Details
-
exists
-
length
-
createSubdirectory
-
scanChildren
-
scanDescendantsPaged
-
size
-
write
-
write
public DirectoryManager write(String relativePathString, io.datarouter.scanner.Scanner<byte[]> chunks) -
write
-
writeUtf8
-
read
-
read
-
readUtf8
-
delete
-
deleteDescendants
-
selfDestruct
public void selfDestruct()This DirectoryManager object will become unusable and need to be recreated -
getRoot
-