public class VfsDataFolder extends Object implements DataFolder
Vfs.Dir
s.Modifier and Type | Field and Description |
---|---|
private List<org.reflections.vfs.Vfs.Dir> |
dirs
All root directories.
|
private String |
name
The name of this folder,
null if this represents the root folder. |
private VfsDataFolder |
parent
The parent directory,
null if this represents the root folder. |
private String |
relativePath
The full path to this folder from
dirs , null if this represents the root folder. |
Constructor and Description |
---|
VfsDataFolder(List<org.reflections.vfs.Vfs.Dir> dirs)
Creates a new root folder.
|
VfsDataFolder(List<org.reflections.vfs.Vfs.Dir> dirs,
VfsDataFolder parent,
String relativePath,
String name) |
Modifier and Type | Method and Description |
---|---|
DataFile |
findFile(String fileName)
Finds a file in this folder.
|
DataFolder |
findFolder(String folderName)
Finds a sub folder in this folder.
|
List<VfsDataFile> |
getFiles()
Finds all files inside this folder.
|
List<VfsDataFolder> |
getFolders()
Finds the all sub folders inside this folder.
|
String |
getName()
The name of this folder,
null if this represents the root folder. |
VfsDataFolder |
getParent()
The parent directory,
null if this represents the root folder. |
private boolean |
isFileFromFolder(org.reflections.vfs.Vfs.File file) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forAllFiles, forAllFiles, getFolder, getPath
private final List<org.reflections.vfs.Vfs.Dir> dirs
private final VfsDataFolder parent
null
if this represents the root folder.private final String relativePath
dirs
, null
if this represents the root folder.private final String name
null
if this represents the root folder.public VfsDataFolder(List<org.reflections.vfs.Vfs.Dir> dirs)
dirs
- the directories that represent the root of the data folder@ConstructorProperties(value={"dirs","parent","relativePath","name"}) @Generated(value="lombok") public VfsDataFolder(List<org.reflections.vfs.Vfs.Dir> dirs, VfsDataFolder parent, String relativePath, String name)
public DataFile findFile(String fileName)
DataFolder
findFile
in interface DataFolder
fileName
- the name of the filenull
if no file with such a name existspublic DataFolder findFolder(String folderName)
DataFolder
findFolder
in interface DataFolder
folderName
- the name of the sub foldernull
if no folder with such a name existspublic List<VfsDataFile> getFiles()
DataFolder
sub folder
getFiles
in interface DataFolder
public List<VfsDataFolder> getFolders()
DataFolder
getFolders
in interface DataFolder
private boolean isFileFromFolder(org.reflections.vfs.Vfs.File file)
@Generated(value="lombok") public VfsDataFolder getParent()
null
if this represents the root folder.getParent
in interface DataFolder
null
if this folder is the root folder@Generated(value="lombok") public String getName()
null
if this represents the root folder.getName
in interface DataFolder
null
for the root folderCopyright © 2022 fastnate.org. All rights reserved.