Package one.microstream.storage.types
Interface StorageFile
- All Known Subinterfaces:
StorageBackupFile,StorageChannelFile,StorageChannelImportSourceFile,StorageDataFile<I>,StorageInventoryFile,StorageLockedFile,StorageNumberedFile
- All Known Implementing Classes:
StorageBackupFile.Default,StorageDataFile.Default,StorageInventoryFile.Default,StorageLockedFile.Default,StorageNumberedFile.Default,StorageRequestTaskImportData.SourceFileSlice
public interface StorageFile
Type that symbolizes any entity that allows physically persisting and reading a randomly accessible sequence
of bytes. This might typically be a file system file entity, but not necessarily.
-
Method Summary
Modifier and Type Method Description static VarStringassembleNameAndSize(VarString vs, StorageFile file)default voidclose()static voidclose(StorageFile file, Throwable cause)booleandelete()booleanexists()FileChannelfileChannel()default StorageFileflush()Stringidentifier()Returns a string uniquely identifying the file represented by this instance.default booleanisEmpty()default booleanisOpen()longlength()Stringname()Return a compact string containing a specific, but not necessarily unique name of the file represented by this instance.Stringqualifier()Returns a string that givesname()a unique identity.
-
Method Details
-
qualifier
String qualifier()Returns a string that givesname()a unique identity. Example: The parent directory path of a file. -
identifier
String identifier()Returns a string uniquely identifying the file represented by this instance.- Returns:
- this file's unique identifier.
- See Also:
name()
-
name
String name()Return a compact string containing a specific, but not necessarily unique name of the file represented by this instance. Might be the same string returned byidentifier().- Returns:
- this file's name.
- See Also:
identifier()
-
length
long length() -
isEmpty
default boolean isEmpty() -
delete
boolean delete() -
exists
boolean exists() -
fileChannel
FileChannel fileChannel() -
isOpen
default boolean isOpen() -
flush
-
close
default void close() -
close
-
assembleNameAndSize
-