public interface DataFolder
DataProvider.| Modifier and Type | Method and Description |
|---|---|
default DataFile |
findFile(String name)
Finds a file in this folder.
|
default DataFolder |
findFolder(String name)
Finds a sub folder in this folder.
|
default void |
forAllFiles(BiConsumer<DataFolder,DataFile> consumer)
Finds all files in this folder and in all sub folders and handles them with the given consumer.
|
default void |
forAllFiles(Consumer<DataFile> consumer)
Finds all files in this folder and in all sub folders and handles them with the given consumer.
|
List<? extends DataFile> |
getFiles()
Finds all files inside this folder.
|
default DataFolder |
getFolder(String name)
Finds a sub folder in this folder.
|
List<? extends DataFolder> |
getFolders()
Finds the all sub folders inside this folder.
|
String |
getName()
The name of this folder.
|
DataFolder |
getParent()
The parent folder of this folder.
|
default DataFolder |
getPath(String path)
Splits the given path by '/' and returns the folder according to the single path elements.
|
default DataFile findFile(String name)
name - the name of the filenull if no file with such a name existsdefault DataFolder findFolder(String name)
name - the name of the sub foldernull if no folder with such a name existsdefault void forAllFiles(BiConsumer<DataFolder,DataFile> consumer) throws IOException
consumer - handles each of the filesIOException - if one of the files was not accessibledefault void forAllFiles(Consumer<DataFile> consumer) throws IOException
consumer - handles each of the filesIOException - if one of the files was not accessibleList<? extends DataFile> getFiles()
sub folderdefault DataFolder getFolder(String name)
name - the name of the sub folderList<? extends DataFolder> getFolders()
String getName()
null for the root folderDataFolder getParent()
null if this folder is the root folderdefault DataFolder getPath(String path)
path - the relative path to the folder from this folderCopyright © 2022 fastnate.org. All rights reserved.