public class FolderWrapper extends java.io.File implements IAbstractFolder
IAbstractFolder extending File.IAbstractFolder.FilenameFilter| Constructor and Description |
|---|
FolderWrapper(java.io.File file)
Creates a new File instance matching a give
File object. |
FolderWrapper(java.io.File parent,
java.lang.String child)
Creates a new File instance from a parent abstract pathname and a child pathname string.
|
FolderWrapper(java.lang.String pathname)
Creates a new File instance by converting the given pathname string into an abstract
pathname.
|
FolderWrapper(java.lang.String parent,
java.lang.String child)
Creates a new File instance from a parent abstract pathname and a child pathname string.
|
FolderWrapper(java.net.URI uri)
Creates a new File instance by converting the given
file: URI into an
abstract pathname. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Returns whether the resource actually exists.
|
IAbstractFile |
getFile(java.lang.String name)
Returns an
IAbstractFile representing a child of the current folder with the
given name. |
IAbstractFolder |
getFolder(java.lang.String name)
Returns an
IAbstractFolder representing a child of the current folder with the
given name. |
java.lang.String |
getOsLocation()
Returns the OS path of the folder location (may be absolute).
|
IAbstractFolder |
getParentFolder()
Returns the parent folder or null if there is no parent.
|
boolean |
hasFile(java.lang.String name)
Returns true if the receiver contains a file with a given name
|
java.lang.String[] |
list(IAbstractFolder.FilenameFilter filter)
Returns a list of all existing file and directory members in this folder
that satisfy the specified filter.
|
IAbstractResource[] |
listMembers()
Returns a list of all existing file and directory members in this folder.
|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURLclone, finalize, getClass, notify, notifyAll, wait, wait, waitdelete, getName, getPathpublic FolderWrapper(java.io.File parent,
java.lang.String child)
parent - the parent pathnamechild - the child nameFile.File(File, String)public FolderWrapper(java.lang.String pathname)
pathname - the pathnameFile.File(String)public FolderWrapper(java.lang.String parent,
java.lang.String child)
parent - the parent pathnamechild - the child nameFile.File(String, String)public FolderWrapper(java.net.URI uri)
file: URI into an
abstract pathname.uri - An absolute, hierarchical URI with a scheme equal to "file", a non-empty path
component, and undefined authority, query, and fragment componentsFile.File(URI)public FolderWrapper(java.io.File file)
File object.file - the file to matchpublic IAbstractResource[] listMembers()
IAbstractFolderlistMembers in interface IAbstractFolderpublic boolean hasFile(java.lang.String name)
IAbstractFolderhasFile in interface IAbstractFoldername - the name of the file. This is the name without the path leading to the
parent folder.public IAbstractFile getFile(java.lang.String name)
IAbstractFolderIAbstractFile representing a child of the current folder with the
given name. The file may not actually exist.getFile in interface IAbstractFoldername - the name of the file.public IAbstractFolder getFolder(java.lang.String name)
IAbstractFolderIAbstractFolder representing a child of the current folder with the
given name. The folder may not actually exist.getFolder in interface IAbstractFoldername - the name of the folder.public IAbstractFolder getParentFolder()
IAbstractResourcegetParentFolder in interface IAbstractResourcepublic java.lang.String getOsLocation()
IAbstractResourcegetOsLocation in interface IAbstractResourcepublic boolean exists()
IAbstractResourceexists in interface IAbstractResourceexists in class java.io.Filepublic java.lang.String[] list(IAbstractFolder.FilenameFilter filter)
IAbstractFolderlist in interface IAbstractFolderfilter - A filename filter instance. Must not be null.File.getName()).
The array can be empty but is never null.