|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.commons.vfs.impl.DecoratedFileObject
org.apache.commons.vfs.cache.OnCallRefreshFileObject
This decorator refreshes the fileObject data on every call
| Constructor Summary | |
OnCallRefreshFileObject(FileObject fileObject)
|
|
| Method Summary | |
void |
close()
Closes this file, and its content. |
void |
copyFrom(FileObject srcFile,
FileSelector selector)
Copies another file, and all its descendents, to this file. |
void |
createFile()
Creates this file, if it does not exist. |
void |
createFolder()
Creates this folder, if it does not exist. |
boolean |
delete()
Deletes this file. |
int |
delete(FileSelector selector)
Deletes all descendents of this file that match a selector. |
boolean |
exists()
Determines if this file exists. |
FileObject[] |
findFiles(FileSelector selector)
Finds the set of matching descendents of this file, in depthwise order. |
void |
findFiles(FileSelector selector,
boolean depthwise,
List selected)
Finds the set of matching descendents of this file. |
FileObject |
getChild(String name)
Returns a child of this file. |
FileObject[] |
getChildren()
Lists the children of this file. |
FileContent |
getContent()
Returns this file's content. |
FileType |
getType()
Returns this file's type. |
boolean |
isHidden()
Determines if this file is hidden. |
boolean |
isReadable()
Determines if this file can be read. |
boolean |
isWriteable()
Determines if this file can be written to. |
void |
moveTo(FileObject destFile)
Move this file. |
FileObject |
resolveFile(String path)
Finds a file, relative to this file. |
FileObject |
resolveFile(String name,
NameScope scope)
Finds a file, relative to this file. |
| Methods inherited from class org.apache.commons.vfs.impl.DecoratedFileObject |
canRenameTo, getDecoratedFileObject, getFileOperations, getFileSystem, getName, getParent, getURL, isAttached, isContentOpen, refresh, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public OnCallRefreshFileObject(FileObject fileObject)
| Method Detail |
public void close()
throws FileSystemException
FileObjectThe file object can continue to be used after this method is called.
close in interface FileObjectclose in class DecoratedFileObjectFileSystemException
public void copyFrom(FileObject srcFile,
FileSelector selector)
throws FileSystemException
FileObjectThis method is not transactional. If it fails and throws an exception, this file will potentially only be partially copied.
copyFrom in interface FileObjectcopyFrom in class DecoratedFileObjectFileSystemException
public void createFile()
throws FileSystemException
FileObject
createFile in interface FileObjectcreateFile in class DecoratedFileObjectFileSystemException
public void createFolder()
throws FileSystemException
FileObject
createFolder in interface FileObjectcreateFolder in class DecoratedFileObjectFileSystemException
public boolean delete()
throws FileSystemException
FileObjectFileObject.delete(FileSelector) for that.
delete in interface FileObjectdelete in class DecoratedFileObjectFileSystemException
public int delete(FileSelector selector)
throws FileSystemException
FileObjectThis method is not transactional. If it fails and throws an exception, this file will potentially only be partially deleted.
delete in interface FileObjectdelete in class DecoratedFileObjectFileSystemException
public boolean exists()
throws FileSystemException
FileObject
exists in interface FileObjectexists in class DecoratedFileObjectFileSystemException
public void findFiles(FileSelector selector,
boolean depthwise,
List selected)
throws FileSystemException
FileObject
findFiles in interface FileObjectfindFiles in class DecoratedFileObjectFileSystemException
public FileObject[] findFiles(FileSelector selector)
throws FileSystemException
FileObject
findFiles in interface FileObjectfindFiles in class DecoratedFileObjectFileSystemException
public FileObject getChild(String name)
throws FileSystemException
FileObjectnull
when the child does not exist. This differs from
FileObject.resolveFile( String, NameScope) which never returns null.
getChild in interface FileObjectgetChild in class DecoratedFileObjectFileSystemException
public FileObject[] getChildren()
throws FileSystemException
FileObject
getChildren in interface FileObjectgetChildren in class DecoratedFileObjectFileSystemException
public FileContent getContent()
throws FileSystemException
FileObjectFileContent returned by this
method can be used to read and write the content of the file.
This method can be called if the file does not exist, and
the returned FileContent can be used to create the file
by writing its content.
getContent in interface FileObjectgetContent in class DecoratedFileObjectFileSystemException
public FileType getType()
throws FileSystemException
FileObject
getType in interface FileObjectgetType in class DecoratedFileObjectFileSystemException
public boolean isHidden()
throws FileSystemException
FileObject
isHidden in interface FileObjectisHidden in class DecoratedFileObjectFileSystemException
public boolean isReadable()
throws FileSystemException
FileObject
isReadable in interface FileObjectisReadable in class DecoratedFileObjectFileSystemException
public boolean isWriteable()
throws FileSystemException
FileObject
isWriteable in interface FileObjectisWriteable in class DecoratedFileObjectFileSystemException
public void moveTo(FileObject destFile)
throws FileSystemException
FileObjectIf the destFile exists, it is deleted first
moveTo in interface FileObjectmoveTo in class DecoratedFileObjectFileSystemException
public FileObject resolveFile(String name,
NameScope scope)
throws FileSystemException
FileObjectNameScope
for a description of how names are resolved in the different scopes.
resolveFile in interface FileObjectresolveFile in class DecoratedFileObjectFileSystemException
public FileObject resolveFile(String path)
throws FileSystemException
FileObjectresolveFile( path, NameScope.FILE_SYSTEM ).
resolveFile in interface FileObjectresolveFile in class DecoratedFileObjectFileSystemException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||