|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdk.apaq.vfs.impl.subfs.SubNode
dk.apaq.vfs.impl.subfs.SubDirectory
public class SubDirectory
| Field Summary |
|---|
| Fields inherited from class dk.apaq.vfs.impl.subfs.SubNode |
|---|
fs |
| Constructor Summary | |
|---|---|
SubDirectory(FileSystem fs,
SubDirectory parent,
Directory subbedDirectory)
|
|
| 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 class dk.apaq.vfs.impl.subfs.SubNode |
|---|
canRead, canWrite, compareTo, compareTo, delete, equals, equals, getBaseName, getFileSystem, getLastModified, getName, getParent, getPath, getSuffix, isDirectory, isFile, isHidden, moveTo, moveTo, setLastModified, setName, toUri |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
| Constructor Detail |
|---|
public SubDirectory(FileSystem fs,
SubDirectory parent,
Directory subbedDirectory)
| Method Detail |
|---|
public Directory createDirectory(String name)
throws IOException
Directory
createDirectory in interface Directoryname - The name of the new directory.
IOException - Throws if an error occurs while creating the directory.
public File createFile(String name)
throws IOException
Directory
createFile in interface Directoryname - The name of the new file.
IOException - Thrown if an error occurs while creating the new file.public boolean isRoot()
Directory
isRoot in interface Directorypublic boolean hasChild(String name)
Directory
hasChild in interface Directoryname - The name of the child.
public boolean hasFile(String name)
Directory
hasFile in interface Directoryname - The name of the file.
public boolean hasDirectory(String name)
Directory
hasDirectory in interface Directoryname - The name of the directory.
public Node getChild(String name)
throws FileNotFoundException
Directory
getChild in interface Directoryname - The name of the child to retrieve.
FileNotFoundException - Thrown if no child with the given name exists.
public File getFile(String name)
throws FileNotFoundException
Directory
getFile in interface Directoryname - 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.
public Directory getDirectory(String name)
throws FileNotFoundException
Directory
getDirectory in interface Directoryname - 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.
public File getFile(String name,
boolean createIfNeeded)
throws FileNotFoundException,
IOException
Directory
getFile in interface Directoryname - 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.
public Directory getDirectory(String name,
boolean createIfNeeded)
throws FileNotFoundException,
IOException
Directory
getDirectory in interface Directoryname - 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.public List<Node> getChildren()
Directory
getChildren in interface Directorypublic List<Directory> getDirectories()
Directory
getDirectories in interface Directorypublic List<File> getFiles()
Directory
getFiles in interface Directorypublic List<Node> getChildren(NodeFilter filter)
Directory
getChildren in interface Directorypublic List<Directory> getDirectories(NodeFilter filter)
Directory
getDirectories in interface Directorypublic List<File> getFiles(NodeFilter filter)
Directory
getFiles in interface Directory
public void delete(boolean recursive)
throws IOException
Directory
delete in interface Directoryrecursive - Wether the deletion should be recursive.
IOException - Thrown if an error occurs during deletion.public boolean isBundle()
Directory
isBundle in interface Directory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||