|
||||||||||
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 final 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. |
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 |
---|
getExtension, getParentFolder, lastModifiedTime, readString, sync, write, write, write |
Methods inherited from class java.io.File |
---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, 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, 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 namepublic Folder(String parent, String child)
parent
- parentchild
- childpublic Folder(URI uri)
uri
- folder uriMethod Detail |
---|
public void ensureExists() throws IOException
IOException
- Thrown if folder cannot be createdpublic 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 File
File.delete()
public boolean removeFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |