|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Directory
| Method Summary | |
|---|---|
Directory |
createDirectory(String name)
Creates a new directory. |
File |
createFile(String name)
Creates a new File. |
void |
delete(boolean recursive)
Deletes the current directory. |
Node |
getChild(String name)
Retrieves a child with the given name. |
List<Node> |
getChildren()
Retrieves a list of all children in the directory. |
List<Node> |
getChildren(NodeFilter filter)
Retrieves a list of children in the directory. |
List<Directory> |
getDirectories()
Retrieves a list of all directories in the directory. |
List<Directory> |
getDirectories(NodeFilter filter)
Retrieves a list of directories in the directory. |
Directory |
getDirectory(String name)
Retrieves a directory with the given name. |
Directory |
getDirectory(String name,
boolean createIfNeeded)
Retrieves a directory with the given name. |
File |
getFile(String name)
Retrieves a file with the given name. |
File |
getFile(String name,
boolean createIfNeeded)
Retrieves a file with the given name. |
List<File> |
getFiles()
Retrieves a list of all files in the directory. |
List<File> |
getFiles(NodeFilter filter)
Retrieves a list of files in the directory. |
boolean |
hasChild(String name)
Checks wether the directory contains a child(File of Directory) with the given name. |
boolean |
hasDirectory(String name)
Checks wether the directory contains a directory with the given name. |
boolean |
hasFile(String name)
Checks wether the directory contains a file with the given name. |
boolean |
isBundle()
Wether this directory is a bundle or not. |
boolean |
isRoot()
Checks wether this directory is the root of the filesystem. |
| Methods inherited from interface dk.apaq.vfs.Node |
|---|
canRead, canWrite, compareTo, delete, equals, getBaseName, getFileSystem, getLastModified, getName, getParent, getPath, getSuffix, isDirectory, isFile, isHidden, moveTo, moveTo, setLastModified, setName, toUri |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
Directory createDirectory(String name)
throws IOException
name - The name of the new directory.
IOException - Throws if an error occurs while creating the directory.
File createFile(String name)
throws IOException
name - The name of the new file.
IOException - Thrown if an error occurs while creating the new file.boolean isRoot()
boolean hasChild(String name)
name - The name of the child.
boolean hasFile(String name)
name - The name of the file.
boolean hasDirectory(String name)
name - The name of the directory.
Node getChild(String name)
throws FileNotFoundException
name - The name of the child to retrieve.
FileNotFoundException - Thrown if no child with the given name exists.
File getFile(String name)
throws FileNotFoundException
name - The name of the file to retrieve.
FileNotFoundException - Thrown if no file with the given name exists or the child with the given name is a directory.
Directory getDirectory(String name)
throws FileNotFoundException
name - The name of the directory to retrieve.
FileNotFoundException - Thrown if no directory with the given name exists or the child with the given name is a file.
File getFile(String name,
boolean createIfNeeded)
throws FileNotFoundException,
IOException
name - The name of the file to retrieve.createIfNeeded - Wether the file should be created if it does not exist.
FileNotFoundException - Thrown if no file with the given name exists or the child with the given name is a directory.
IOException - Thrown if an error occurs while creating file.
Directory getDirectory(String name,
boolean createIfNeeded)
throws FileNotFoundException,
IOException
name - The name of the directory to retrieve.createIfNeeded - Wether the directory should be created if it does not exist.
FileNotFoundException - Thrown if no directory with the given name exists or the child with the given name is a file.
IOException - Thrown if an error occurs while creating directory.List<Node> getChildren()
List<Directory> getDirectories()
List<File> getFiles()
List<Node> getChildren(NodeFilter filter)
filer - The filter to use for listing children or null to list all children.
List<Directory> getDirectories(NodeFilter filter)
filer - The filter to use for listing directories or null to list all directories.
List<File> getFiles(NodeFilter filter)
filer - The filter to use for listing files or null to list all files.
void delete(boolean recursive)
throws IOException
recursive - Wether the deletion should be recursive.
IOException - Thrown if an error occurs during deletion.boolean isBundle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||