|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.File
org.apache.wicket.util.file.File
org.apache.wicket.util.file.Folder
public class Folder
This folder subclass provides some type safety and extensibility for "files" that hold other files.
| Nested Class Summary | |
|---|---|
static interface |
Folder.FileFilter
Filter for files |
static interface |
Folder.FolderFilter
Filter for folders |
| Field Summary |
|---|
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
|---|---|
Folder(File file)
Construct. |
|
Folder(Folder parent,
String child)
Constructor. |
|
Folder(String pathname)
Constructor. |
|
Folder(String parent,
String child)
Constructor. |
|
Folder(URI uri)
Constructor. |
|
| Method Summary | |
|---|---|
void |
ensureExists()
Does a mkdirs() on this folder if it does not exist. |
Folder |
folder(String name)
|
File[] |
getFiles()
|
File[] |
getFiles(Folder.FileFilter filter)
|
Folder[] |
getFolders()
Gets all folders in this folder, except "." and ".." |
Folder[] |
getFolders(Folder.FolderFilter filter)
|
File[] |
getNestedFiles()
|
File[] |
getNestedFiles(Folder.FileFilter filter)
Gets files in this folder matching a given filter recursively. |
boolean |
remove()
Removes this folder and everything in it, recursively. |
boolean |
removeFiles()
Removes all the files in this folder. |
| Methods inherited from class org.apache.wicket.util.file.File |
|---|
file, getExtension, getParentFolder, inputStream, lastModifiedTime, outputStream, readObject, readString, sync, toQuotedString, write, write, write, writeObject |
| Methods inherited from class java.io.File |
|---|
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Folder(Folder parent,
String child)
parent - parentchild - childpublic Folder(File file)
file - Filepublic Folder(String pathname)
pathname - path name
public Folder(String parent,
String child)
parent - parentchild - childpublic Folder(URI uri)
uri - folder uri| Method Detail |
|---|
public void ensureExists()
throws IOException
IOException - Thrown if folder cannot be createdpublic Folder folder(String name)
name - Name of child folder
public File[] getFiles()
public File[] getNestedFiles()
public File[] getNestedFiles(Folder.FileFilter filter)
filter - The filter
public File[] getFiles(Folder.FileFilter filter)
filter - File filter
public Folder[] getFolders()
public Folder[] getFolders(Folder.FolderFilter filter)
filter - Folder filter
public boolean remove()
remove in class FileFile.delete()public boolean removeFiles()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||