Package one.microstream.afs
Interface ADirectory
- All Superinterfaces:
AItem
,AResolving
- All Known Subinterfaces:
ADirectory.Wrapper
,ARoot
- All Known Implementing Classes:
ADirectory.Abstract
,ADirectory.Default
,ARoot.Default
public interface ADirectory extends AItem, AResolving
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ADirectory.Abstract
static class
ADirectory.Default
static interface
ADirectory.Observer
static interface
ADirectory.Wrapper
-
Method Summary
Modifier and Type Method Description <R> R
accessDirectories(Function<? super XGettingTable<String,? extends ADirectory>,R> logic)
<S, R> R
accessDirectories(S subject, BiFunction<? super XGettingTable<String,? extends ADirectory>,S,R> logic)
<R> R
accessFiles(Function<? super XGettingTable<String,? extends AFile>,R> logic)
<S, R> R
accessFiles(S subject, BiFunction<? super XGettingTable<String,? extends AFile>,S,R> logic)
static ADirectory
actual(ADirectory directory)
int
consolidate()
Removes all child items (ADirectory
orAFile
) that have no physical equivalent.int
consolidateDirectories()
int
consolidateFiles()
default boolean
contains(ADirectory directory)
default boolean
contains(AFile file)
boolean
contains(AItem item)
default boolean
containsDeep(ADirectory directory)
default boolean
containsDeep(AFile file)
boolean
containsDeep(AItem item)
boolean
containsDirectory(String directoryName)
boolean
containsFile(String fileName)
boolean
containsItem(String itemName)
ADirectory
ensureDirectory(String identifier)
default boolean
ensureExists()
default AFile
ensureFile(String identifier)
default AFile
ensureFile(String name, String type)
AFile
ensureFile(String identifier, String name, String type)
default boolean
exists()
Queries whether the item represented by this instance actually physically exists on the underlying storage layer.ADirectory
getDirectory(String identifier)
AFile
getFile(String identifier)
AItem
getItem(String identifier)
ADirectory
inventorize()
<C extends Consumer<? super ADirectory>>
CiterateDirectories(C iterator)
<C extends Consumer<? super AFile>>
CiterateFiles(C iterator)
<C extends Consumer<? super AItem>>
CiterateItems(C iterator)
<C extends Consumer<? super ADirectory.Observer>>
CiterateObservers(C logic)
default XGettingEnum<ADirectory>
listDirectories()
default XGettingEnum<AFile>
listFiles()
default XGettingEnum<AItem>
listItems()
static ADirectory
New(ADirectory parent, String identifier)
boolean
registerObserver(ADirectory.Observer observer)
boolean
removeObserver(ADirectory.Observer observer)
ADirectory
resolveDirectoryPath(String[] pathElements, int offset, int length)
default String[]
toPath()
default String
toPathString()
The value that uniquely identifies the item globally in the whole file system.Methods inherited from interface one.microstream.afs.AResolving
resolveDirectoryPath, resolveFilePath, resolveFilePath, resolveFilePath
-
Method Details
-
toPathString
Description copied from interface:AItem
The value that uniquely identifies the item globally in the whole file system.Note that this value is usually a combination of the identifiers of
AItem.parent()
directories and the localAItem.identifier()
, but such a relation is not mandatory.- Specified by:
toPathString
in interfaceAItem
- Returns:
- the item's globally unique identifier.
- See Also:
AItem.parent()
,AItem.identifier()
-
toPath
-
accessDirectories
-
accessFiles
-
accessDirectories
<S, R> R accessDirectories(S subject, BiFunction<? super XGettingTable<String,? extends ADirectory>,S,R> logic) -
accessFiles
<S, R> R accessFiles(S subject, BiFunction<? super XGettingTable<String,? extends AFile>,S,R> logic) -
registerObserver
-
removeObserver
-
iterateObservers
-
ensureExists
default boolean ensureExists() -
ensureDirectory
-
ensureFile
-
ensureFile
-
ensureFile
-
getItem
-
getDirectory
-
getFile
-
iterateItems
-
iterateDirectories
-
iterateFiles
-
inventorize
ADirectory inventorize() -
listItems
-
listDirectories
-
listFiles
-
contains
-
contains
-
contains
-
containsDeep
-
containsDeep
-
containsDeep
-
containsItem
-
containsDirectory
-
containsFile
-
resolveDirectoryPath
- Specified by:
resolveDirectoryPath
in interfaceAResolving
-
exists
default boolean exists()Description copied from interface:AItem
Queries whether the item represented by this instance actually physically exists on the underlying storage layer. -
consolidate
int consolidate()Removes all child items (ADirectory
orAFile
) that have no physical equivalent.- Returns:
-
consolidateDirectories
int consolidateDirectories() -
consolidateFiles
int consolidateFiles() -
New
-
actual
-