Package org.fastnate.data.files
Class FsDataFolder
java.lang.Object
org.fastnate.data.files.FsDataFolder
- All Implemented Interfaces:
DataFolder
Represents a folder from the file system.
- Author:
- Tobias Liefke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFinds a file in this folder.findFolder(String name) Finds a sub folder in this folder.getFiles()Finds all files inside this folder.The directory from the filesystemFinds the all sub folders inside this folder.getName()The name of this folder.The parent folder of this folder.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fastnate.data.files.DataFolder
forAllFiles, forAllFiles, getFolder, getPath
-
Constructor Details
-
FsDataFolder
Creates a newFsDataFolderinstance.- Parameters:
folder- The directory from the filesystem
-
-
Method Details
-
findFile
Description copied from interface:DataFolderFinds a file in this folder.- Specified by:
findFilein interfaceDataFolder- Parameters:
name- the name of the file- Returns:
- the file or
nullif no file with such a name exists
-
findFolder
Description copied from interface:DataFolderFinds a sub folder in this folder.- Specified by:
findFolderin interfaceDataFolder- Parameters:
name- the name of the sub folder- Returns:
- the sub folder or
nullif no folder with such a name exists
-
getFiles
Description copied from interface:DataFolderFinds all files inside this folder. Will not return a file from asub folder- Specified by:
getFilesin interfaceDataFolder- Returns:
- the files in this folder
-
getFolders
Description copied from interface:DataFolderFinds the all sub folders inside this folder.- Specified by:
getFoldersin interfaceDataFolder- Returns:
- the direct children of this folder
-
getName
Description copied from interface:DataFolderThe name of this folder.- Specified by:
getNamein interfaceDataFolder- Returns:
- the name of this folder, empty or
nullfor the root folder
-
getParent
Description copied from interface:DataFolderThe parent folder of this folder.- Specified by:
getParentin interfaceDataFolder- Returns:
- the parent or
nullif this folder is the root folder
-
getFolder
The directory from the filesystem
-