Method Summary |
|
public boolean | canRenameTo(FileObject newfile) Queries the object if a simple rename to the filename of newfile
is possible. |
protected void | childrenChanged() Notifies the file that its children have changed. |
protected void | childrenChanged(FileName childName, FileType newType) Notifies the file that its children have changed. |
public void | close() Closes this file, and its content. |
public void | copyFrom(FileObject file, FileSelector selector) Copies another file to this file. |
public void | createFile() Creates this file, if it does not exist. |
public void | createFolder() Creates this folder, if it does not exist. |
public boolean | delete() Deletes this file. |
public int | delete(FileSelector selector) Deletes this file, and all children. |
protected void | doAttach() Attaches this file object to its file resource. |
protected FileContent | doCreateFileContent() |
protected void | doCreateFolder() Creates this file as a folder. |
protected void | doDelete() Deletes the file. |
protected void | doDetach() Detaches this file object from its file resource.
Called when this file is closed. |
protected Map | doGetAttributes() Returns the attributes of this file. |
protected Certificate[] | doGetCertificates() Returns the certificates used to sign this file. |
abstract protected long | doGetContentSize() Returns the size of the file content (in bytes). |
abstract protected InputStream | doGetInputStream() Creates an input stream to read the file content from. |
protected long | doGetLastModifiedTime() Returns the last modified time of this file. |
protected OutputStream | doGetOutputStream(boolean bAppend) Creates an output stream to write the file content to. |
protected RandomAccessContent | doGetRandomAccessContent(RandomAccessMode mode) Creates access to the file for random i/o. |
abstract protected FileType | doGetType() Determines the type of this file. |
protected boolean | doIsHidden() Determines if this file is hidden. |
protected boolean | doIsReadable() Determines if this file can be read. |
protected boolean | doIsSameFile(FileObject destFile) Checks if this fileObject is the same file as destFile just with a different
name.
E.g. |
protected boolean | doIsWriteable() Determines if this file can be written to. |
abstract protected String[] | doListChildren() Lists the children of this file. |
protected FileObject[] | doListChildrenResolved() Lists the children of this file. |
protected void | doRemoveAttribute(String atttrName) Removes an attribute of this file. |
protected void | doRename(FileObject newfile) Renames the file. |
protected void | doSetAttribute(String atttrName, Object value) Sets an attribute of this file. |
protected boolean | doSetLastModTime(long modtime) Sets the last modified time of this file. |
protected void | doSetLastModifiedTime(long modtime) Sets the last modified time of this file. |
protected void | endOutput() Called when the ouput stream for this file is closed. |
public boolean | exists() Determines if the file exists. |
protected void | finalize() |
public FileObject[] | findFiles(FileSelector selector) Finds the set of matching descendents of this file, in depthwise
order. |
public void | findFiles(FileSelector selector, boolean depthwise, List selected) Traverses the descendents of this file, and builds a list of selected
files. |
public FileObject | getChild(String name) Returns a child of this file. |
public FileObject[] | getChildren() Returns the children of the file. |
public FileContent | getContent() Returns the file's content. |
protected FileContentInfoFactory | getFileContentInfoFactory() |
public FileOperations | getFileOperations() |
public FileSystem | getFileSystem() Returns the file system this file belongs to. |
public InputStream | getInputStream() Returns an input stream to use to read the content of the file. |
public FileName | getName() Returns the name of the file. |
public OutputStream | getOutputStream() Prepares this file for writing. |
public OutputStream | getOutputStream(boolean bAppend) Prepares this file for writing. |
public FileObject | getParent() Returns the parent of the file. |
public RandomAccessContent | getRandomAccessContent(RandomAccessMode mode) Returns an input/output stream to use to read and write the content of the file in and
random manner. |
public FileType | getType() Returns the file's type. |
public URL | getURL() Returns a URL representation of the file. |
protected void | handleChanged() Called when this file is changed.
This will only happen if you monitor the file using
org.apache.commons.vfs.FileMonitor . |
protected void | handleCreate(FileType newType) Called when this file is created. |
protected void | handleDelete() Called when this file is deleted. |
public void | holdObject(Object strongRef) This method is meant to add a object where this object holds a strong reference then.
E.g. |
protected void | injectType(FileType fileType) |
public boolean | isAttached() |
public boolean | isContentOpen() |
public boolean | isHidden() Determines if this file can be read. |
public boolean | isReadable() Determines if this file can be read. |
protected boolean | isSameFile(FileObject destFile) Checks if this fileObject is the same file as destFile just with a different
name.
E.g. |
public boolean | isWriteable() Determines if this file can be written to. |
public void | moveTo(FileObject destFile) |
protected void | notifyAllStreamsClosed() will be called after this file-object closed all its streams. |
protected void | onChange() Called when the type or content of this file changes. |
protected void | onChildrenChanged(FileName child, FileType newType) Called when the children of this file change. |
public void | refresh() |
public FileObject | resolveFile(String name, NameScope scope) Returns a child by name. |
public FileObject | resolveFile(String path) Finds a file, relative to this file.
Parameters: path - The path of the file to locate. |
public String | toString() Returns the URI of the file. |