Class AbstractFileObject<AFS extends AbstractFileSystem>
- Type Parameters:
- AFS- An AbstractFileSystem subclass
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Comparable<FileObject>,- Iterable<FileObject>,- FileObject
- Direct Known Subclasses:
- CompressedFileFileObject,- DelegateFileObject,- FtpFileObject,- Http4FileObject,- Http5FileObject,- HttpFileObject,- LocalFile,- RamFileObject,- SftpFileObject,- TarFileObject,- UrlFileObject,- ZipFileObject
TODO - Check caps in methods like getChildren(), etc, and give better error messages (eg 'this file type does not support listing children', vs 'this is not a folder')
- 
Field SummaryFieldsFields inherited from interface org.apache.commons.vfs2.FileObjectEMPTY_ARRAY
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedAbstractFileObject(AbstractFileName fileName, AFS fileSystem) Constructs a new instance for subclasses.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanRenameTo(FileObject newfile) Queries the object if a simple rename to the file name ofnewfileis possible.protected voidchildrenChanged(FileName childName, FileType newType) Notifies the file that its children have changed.voidclose()Closes this file, and its content.intcompareTo(FileObject file) Compares two FileObjects (ignores case).voidcopyFrom(FileObject file, FileSelector selector) Copies another file to this file.voidCreates this file, if it does not exist.voidCreates this folder, if it does not exist.booleandelete()Deletes this file.intdelete(FileSelector selector) Deletes this file, and all children matching theselector.intDeletes this file and all children.protected voiddoAttach()Attaches this file object to its file resource.protected FileContentCreate a FileContent implementation.protected voidCreates this file as a folder.protected voiddoDelete()Deletes the file.protected voiddoDetach()Detaches this file object from its file resource.Returns the attributes of this file.protected Certificate[]Returns the certificates used to sign this file.protected abstract longReturns the size of the file content (in bytes).protected InputStreamCreates an input stream to read the file content from.protected InputStreamdoGetInputStream(int bufferSize) Creates an input stream to read the file content from.protected longReturns the last modified time of this file.protected OutputStreamdoGetOutputStream(boolean bAppend) Creates an output stream to write the file content to.protected RandomAccessContentCreates access to the file for random i/o.protected abstract FileTypeDetermines the type of this file.protected booleanDetermines if this file is executable.protected booleanDetermines if this file is hidden.protected booleanDetermines if this file can be read.protected booleandoIsSameFile(FileObject destFile) Checks if this fileObject is the same file asdestFilejust with a different name.protected booleanDetermines if this file is a symbolic link.protected booleanDetermines if this file can be written to.protected abstract String[]Lists the children of this file.protected FileObject[]Lists the children of this file.protected voiddoRemoveAttribute(String attrName) Removes an attribute of this file.protected voiddoRename(FileObject newFile) Renames the file.protected voiddoSetAttribute(String attrName, Object value) Sets an attribute of this file.protected booleandoSetExecutable(boolean executable, boolean ownerOnly) Make the file executable.protected booleandoSetLastModifiedTime(long modtime) Sets the last modified time of this file.protected booleandoSetReadable(boolean readable, boolean ownerOnly) Make the file or folder readable.protected booleandoSetWritable(boolean writable, boolean ownerOnly) Make the file or folder writable.protected voidCalled when the output stream for this file is closed.booleanexists()Determines if the file exists.protected voidfinalize()findFiles(FileSelector selector) Finds the set of matching descendants of this file, in depthwise order.voidfindFiles(FileSelector selector, boolean depthwise, List<FileObject> selected) Traverses the descendants of this file, and builds a list of selected files.protected AFSReturns the file system this file belongs to.Returns a child of this file.Returns the children of the file.Returns the file's content.protected FileContentInfoFactoryCreates the FileContentInfo factory.Gets this instance's FileOperations.Returns the file system this file belongs to.Returns an input stream to use to read the content of the file.getInputStream(int bufferSize) Returns an input stream to use to read the content of the file.getName()Returns the name of the file.Prepares this file for writing.getOutputStream(boolean bAppend) Prepares this file for writing.Returns the parent of the file.Returns the receiver as a URI String for public display, like, without a password.Returns an input/output stream to use to read and write the content of the file in and random manner.getType()Returns the file's type.getURL()Returns a URL representation of the file.protected voidCalled when this file is changed.protected voidhandleCreate(FileType newType) Called when this file is created.protected voidCalled when this file is deleted.voidholdObject(Object strongRef) This method is meant to add an object where this object holds a strong reference then.protected voidinjectType(FileType fileType) Sets the file type.booleanCheck if the internal state is "attached".booleanCheck if the content stream is open.booleanDetermines if this file is executable.booleanisFile()Checks if this file is a regular file by using its file type.booleanisFolder()Checks if this file is a folder by using its file type.booleanisHidden()Determines if this file can be read.booleanDetermines if this file can be read.protected booleanisSameFile(FileObject destFile) Checks if this fileObject is the same file asdestFilejust with a different name.booleanDetermines if this file can be read.booleanDetermines if this file can be written to.iterator()Returns an iterator over a set of all FileObject in this file object.listFiles(FileSelector selector) Lists the set of matching descendants of this file, in depthwise order.voidmoveTo(FileObject destFile) Moves (rename) the file to another one.protected voidCalled after this file-object closed all its streams.protected voidonChange()Called when the type or content of this file changes.protected voidonChildrenChanged(FileName child, FileType newType) Called when the children of this file change.voidrefresh()This will prepare the fileObject to get resynchronized with the underlying file system if required.resolveFile(String path) Finds a file, relative to this file.resolveFile(String name, NameScope scope) Returns a child by name.booleansetExecutable(boolean readable, boolean ownerOnly) Sets the owner's (or everybody's) write permission.booleansetReadable(boolean readable, boolean ownerOnly) Sets the owner's (or everybody's) read permission.booleansetWritable(boolean readable, boolean ownerOnly) Sets the owner's (or everybody's) write permission.toString()Returns the URI as a String.Methods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FileObjectgetPath, getURIMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
DEFAULT_BUFFER_SIZESame asBufferedInputStream.- See Also:
 
 
- 
- 
Constructor Details- 
AbstractFileObjectConstructs a new instance for subclasses.- Parameters:
- fileName- the file name.
- fileSystem- the file system.
 
 
- 
- 
Method Details- 
canRenameToQueries the object if a simple rename to the file name ofnewfileis possible.- Specified by:
- canRenameToin interface- FileObject
- Parameters:
- newfile- the new file name
- Returns:
- true if rename is possible
 
- 
childrenChangedNotifies the file that its children have changed.- Parameters:
- childName- The name of the child.
- newType- The type of the child.
- Throws:
- Exception- if an error occurs.
 
- 
closeCloses this file, and its content.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- FileObject
- Throws:
- FileSystemException- if an error occurs.
- See Also:
 
- 
compareToCompares two FileObjects (ignores case).- Specified by:
- compareToin interface- Comparable<AFS extends AbstractFileSystem>
- Parameters:
- file- the object to compare.
- Returns:
- a negative integer, zero, or a positive integer when this object is less than, equal to, or greater than the given object.
 
- 
copyFromCopies another file to this file.- Specified by:
- copyFromin interface- FileObject
- Parameters:
- file- The FileObject to copy.
- selector- The FileSelector.
- Throws:
- FileSystemException- if an error occurs.
 
- 
createFileCreates this file, if it does not exist.- Specified by:
- createFilein interface- FileObject
- Throws:
- FileSystemException- if an error occurs.
 
- 
createFolderCreates this folder, if it does not exist. Also creates any ancestor files which do not exist.- Specified by:
- createFolderin interface- FileObject
- Throws:
- FileSystemException- if an error occurs.
 
- 
deleteDeletes this file.TODO - This will not fail if this is a non-empty folder. - Specified by:
- deletein interface- FileObject
- Returns:
- true if this object has been deleted
- Throws:
- FileSystemException- if an error occurs.
 
- 
deleteDeletes this file, and all children matching theselector.- Specified by:
- deletein interface- FileObject
- Parameters:
- selector- The FileSelector.
- Returns:
- the number of deleted files.
- Throws:
- FileSystemException- if an error occurs.
 
- 
deleteAllDeletes this file and all children. Shorthand fordelete(Selectors.SELECT_ALL)- Specified by:
- deleteAllin interface- FileObject
- Returns:
- the number of deleted files.
- Throws:
- FileSystemException- if an error occurs.
- See Also:
 
- 
doAttachAttaches this file object to its file resource.This method is called before any of the doBlah() or onBlah() methods. Sub-classes can use this method to perform lazy initialization. This implementation does nothing. - Throws:
- Exception- if an error occurs.
 
- 
doCreateFileContentCreate a FileContent implementation.- Returns:
- The FileContent.
- Throws:
- FileSystemException- if an error occurs.
- Since:
- 2.0
 
- 
doCreateFolderCreates this file as a folder. Is only called when:- doGetType()returns- FileType.IMAGINARY.
- The parent folder exists and is writable, or this file is the root of the file system.
 - Throws:
- Exception- if an error occurs.
 
- 
doDeleteDeletes the file. Is only called when:- doGetType()does not return- FileType.IMAGINARY.
- doIsWriteable()returns true.
- This file has no children, if a folder.
 - Throws:
- Exception- if an error occurs.
 
- 
doDetachDetaches this file object from its file resource.Called when this file is closed. Note that the file object may be reused later, so should be able to be reattached. This implementation does nothing. - Throws:
- Exception- if an error occurs.
 
- 
doGetAttributesReturns the attributes of this file. Is only called ifdoGetType()does not returnFileType.IMAGINARY.This implementation always returns an empty map. - Returns:
- The attributes of the file.
- Throws:
- Exception- if an error occurs.
 
- 
doGetCertificatesReturns the certificates used to sign this file. Is only called ifdoGetType()does not returnFileType.IMAGINARY.This implementation always returns null. - Returns:
- The certificates used to sign the file.
- Throws:
- Exception- if an error occurs.
 
- 
doGetContentSizeReturns the size of the file content (in bytes). Is only called ifdoGetType()returnsFileType.FILE.- Returns:
- The size of the file in bytes.
- Throws:
- Exception- if an error occurs.
 
- 
doGetInputStreamCreates an input stream to read the file content from. Is only called ifdoGetType()returnsFileType.FILE.It is guaranteed that there are no open output streams for this file when this method is called. The returned stream does not have to be buffered. - Returns:
- An InputStream to read the file content.
- Throws:
- Exception- if an error occurs.
 
- 
doGetInputStreamCreates an input stream to read the file content from. Is only called ifdoGetType()returnsFileType.FILE.It is guaranteed that there are no open output streams for this file when this method is called. The returned stream does not have to be buffered. - Parameters:
- bufferSize- Buffer size hint.
- Returns:
- An InputStream to read the file content.
- Throws:
- Exception- if an error occurs.
 
- 
doGetLastModifiedTimeReturns the last modified time of this file. Is only called ifdoGetType()does not returnThis implementation throws an exception. - Returns:
- The last modification time.
- Throws:
- Exception- if an error occurs.
 
- 
doGetOutputStreamCreates an output stream to write the file content to. Is only called if:- doIsWriteable()returns true.
- doGetType()returns- FileType.FILE, or- doGetType()returns- FileType.IMAGINARY, and the file's parent exists and is a folder.
 The returned stream does not have to be buffered. This implementation throws an exception. - Parameters:
- bAppend- true if the file should be appended to, false if it should be overwritten.
- Returns:
- An OutputStream to write to the file.
- Throws:
- Exception- if an error occurs.
 
- 
doGetRandomAccessContentCreates access to the file for random i/o. Is only called ifdoGetType()returnsFileType.FILE.It is guaranteed that there are no open output streams for this file when this method is called. - Parameters:
- mode- The mode to access the file.
- Returns:
- The RandomAccessContext.
- Throws:
- Exception- if an error occurs.
 
- 
doGetTypeDetermines the type of this file. Must not return null. The return value of this method is cached, so the implementation can be expensive.- Returns:
- the type of the file.
- Throws:
- Exception- if an error occurs.
 
- 
doIsExecutableDetermines if this file is executable. Is only called ifdoGetType()does not returnFileType.IMAGINARY.This implementation always returns false. - Returns:
- true if the file is executable, false otherwise.
- Throws:
- Exception- if an error occurs.
 
- 
doIsHiddenDetermines if this file is hidden. Is only called ifdoGetType()does not returnFileType.IMAGINARY.This implementation always returns false. - Returns:
- true if the file is hidden, false otherwise.
- Throws:
- Exception- if an error occurs.
 
- 
doIsReadableDetermines if this file can be read. Is only called ifdoGetType()does not returnFileType.IMAGINARY.This implementation always returns true. - Returns:
- true if the file is readable, false otherwise.
- Throws:
- Exception- if an error occurs.
 
- 
doIsSameFileChecks if this fileObject is the same file asdestFilejust with a different name. E.g. for case-insensitive file systems like Windows.- Parameters:
- destFile- The file to compare to.
- Returns:
- true if the FileObjects are the same.
- Throws:
- FileSystemException- if an error occurs.
 
- 
doIsSymbolicLinkDetermines if this file is a symbolic link. Is only called ifdoGetType()does not returnFileType.IMAGINARY.This implementation always returns false. - Returns:
- true if the file is readable, false otherwise.
- Throws:
- Exception- if an error occurs.
- Since:
- 2.4
 
- 
doIsWriteableDetermines if this file can be written to. Is only called ifdoGetType()does not returnFileType.IMAGINARY.This implementation always returns true. - Returns:
- true if the file is writable.
- Throws:
- Exception- if an error occurs.
 
- 
doListChildrenLists the children of this file. Is only called ifdoGetType()returnsFileType.FOLDER. The return value of this method is cached, so the implementation can be expensive.- Returns:
- a possible empty String array if the file is a directory or null or an exception if the file is not a directory or can't be read.
- Throws:
- Exception- if an error occurs.
 
- 
doListChildrenResolvedLists the children of this file.Is only called if doGetType()returnsFileType.FOLDER.The return value of this method is cached, so the implementation can be expensive. Other than doListChildrenyou could return FileObject's to e.g. reinitialize the type of the file.(Introduced for WebDAV: "permission denied on resource" during getType()) - Returns:
- The children of this FileObject.
- Throws:
- Exception- if an error occurs.
 
- 
doRemoveAttributeRemoves an attribute of this file.Is only called if doGetType()does not returnFileType.IMAGINARY.This implementation throws an exception. - Parameters:
- attrName- The name of the attribute to remove.
- Throws:
- Exception- if an error occurs.
- Since:
- 2.0
 
- 
doRenameRenames the file.Is only called when: - doIsWriteable()returns true.
 This implementation throws an exception. - Parameters:
- newFile- A FileObject with the new file name.
- Throws:
- Exception- if an error occurs.
 
- 
doSetAttributeSets an attribute of this file.Is only called if doGetType()does not returnFileType.IMAGINARY.This implementation throws an exception. - Parameters:
- attrName- The attribute name.
- value- The value to be associated with the attribute name.
- Throws:
- Exception- if an error occurs.
 
- 
doSetExecutableMake the file executable.Only called if doGetType()does not returnFileType.IMAGINARY.This implementation returns false. - Parameters:
- executable- True to allow access, false to disallow.
- ownerOnly- If- true, the permission applies only to the owner; otherwise, it applies to everybody.
- Returns:
- true if the operation succeeded.
- Throws:
- Exception- Any Exception thrown is wrapped in FileSystemException.
- Since:
- 2.1
- See Also:
 
- 
doSetLastModifiedTimeSets the last modified time of this file.Is only called if doGetType()does not returnFileType.IMAGINARY.This implementation throws an exception. - Parameters:
- modtime- The last modification time.
- Returns:
- true if the time was set.
- Throws:
- Exception- Any Exception thrown is wrapped in FileSystemException.
 
- 
doSetReadableMake the file or folder readable.Only called if doGetType()does not returnFileType.IMAGINARY.This implementation returns false. - Parameters:
- readable- True to allow access, false to disallow
- ownerOnly- If- true, the permission applies only to the owner; otherwise, it applies to everybody.
- Returns:
- true if the operation succeeded
- Throws:
- Exception- Any Exception thrown is wrapped in FileSystemException.
- Since:
- 2.1
- See Also:
 
- 
doSetWritableMake the file or folder writable.Only called if doGetType()does not returnFileType.IMAGINARY.- Parameters:
- writable- True to allow access, false to disallow
- ownerOnly- If- true, the permission applies only to the owner; otherwise, it applies to everybody.
- Returns:
- true if the operation succeeded
- Throws:
- Exception- Any Exception thrown is wrapped in FileSystemException.
- Since:
- 2.1
- See Also:
 
- 
endOutputCalled when the output stream for this file is closed.- Throws:
- Exception- if an error occurs.
 
- 
existsDetermines if the file exists.- Specified by:
- existsin interface- FileObject
- Returns:
- true if the file exists, false otherwise,
- Throws:
- FileSystemException- if an error occurs.
 
- 
finalize
- 
findFilesFinds the set of matching descendants of this file, in depthwise order.- Specified by:
- findFilesin interface- FileObject
- Parameters:
- selector- The FileSelector.
- Returns:
- list of files or null if the base file (this object) do not exist
- Throws:
- FileSystemException- if an error occurs.
 
- 
findFilespublic void findFiles(FileSelector selector, boolean depthwise, List<FileObject> selected) throws FileSystemException Traverses the descendants of this file, and builds a list of selected files.- Specified by:
- findFilesin interface- FileObject
- Parameters:
- selector- The FileSelector.
- depthwise- if true files are added after their descendants, before otherwise.
- selected- A List of the located FileObjects.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getAbstractFileSystemReturns the file system this file belongs to.- Returns:
- The FileSystem this file is associated with.
 
- 
getChildReturns a child of this file.- Specified by:
- getChildin interface- FileObject
- Parameters:
- name- The name of the child to locate.
- Returns:
- The FileObject for the file or null if the child does not exist.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getChildrenReturns the children of the file.- Specified by:
- getChildrenin interface- FileObject
- Returns:
- an array of FileObjects, one per child.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getContentReturns the file's content.- Specified by:
- getContentin interface- FileObject
- Returns:
- the FileContent for this FileObject.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getFileContentInfoFactoryCreates the FileContentInfo factory.- Returns:
- The FileContentInfoFactory.
 
- 
getFileOperationsDescription copied from interface:FileObjectGets this instance's FileOperations.- Specified by:
- getFileOperationsin interface- FileObject
- Returns:
- FileOperations interface that provides access to the operations API.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getFileSystemReturns the file system this file belongs to.- Specified by:
- getFileSystemin interface- FileObject
- Returns:
- The FileSystem this file is associated with.
 
- 
getInputStreamReturns an input stream to use to read the content of the file.- Returns:
- The InputStream to access this file's content.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getInputStreamReturns an input stream to use to read the content of the file.- Parameters:
- bufferSize- buffer size hint.
- Returns:
- The InputStream to access this file's content.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getNameReturns the name of the file.- Specified by:
- getNamein interface- FileObject
- Returns:
- The FileName, never null.
 
- 
getOutputStreamPrepares this file for writing. Makes sure it is either a file, or its parent folder exists. Returns an output stream to use to write the content of the file to.- Returns:
- An OutputStream where the new contents of the file can be written.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getOutputStreamPrepares this file for writing. Makes sure it is either a file, or its parent folder exists. Returns an output stream to use to write the content of the file to.- Parameters:
- bAppend- true when append to the file. Note: If the underlying file system does not support appending, a FileSystemException is thrown.
- Returns:
- An OutputStream where the new contents of the file can be written.
- Throws:
- FileSystemException- if an error occurs; for example: bAppend is true, and the underlying FileSystem does not support it
 
- 
getParentReturns the parent of the file.- Specified by:
- getParentin interface- FileObject
- Returns:
- the parent FileObject.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getPublicURIStringReturns the receiver as a URI String for public display, like, without a password.- Specified by:
- getPublicURIStringin interface- FileObject
- Returns:
- A URI String without a password, never null.
 
- 
getRandomAccessContentReturns an input/output stream to use to read and write the content of the file in and random manner.- Parameters:
- mode- The RandomAccessMode.
- Returns:
- The RandomAccessContent.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getTypeReturns the file's type.- Specified by:
- getTypein interface- FileObject
- Returns:
- The FileType.
- Throws:
- FileSystemException- if an error occurs.
 
- 
getURLReturns a URL representation of the file.- Specified by:
- getURLin interface- FileObject
- Returns:
- The URL representation of the file.
- Throws:
- FileSystemException- if an error occurs.
 
- 
handleChangedCalled when this file is changed.This will only happen if you monitor the file using FileMonitor.- Throws:
- Exception- if an error occurs.
 
- 
handleCreateCalled when this file is created. Updates cached info and notifies the parent and file system.- Parameters:
- newType- The type of the file.
- Throws:
- Exception- if an error occurs.
 
- 
handleDeleteCalled when this file is deleted. Updates cached info and notifies subclasses, parent and file system.- Throws:
- Exception- if an error occurs.
 
- 
holdObjectThis method is meant to add an object where this object holds a strong reference then. E.g. an archive-file system creates a list of all children and they shouldn't get garbage collected until the container is garbage collected- Parameters:
- strongRef- The Object to add.
 
- 
injectTypeSets the file type.- Parameters:
- fileType- the file type.
 
- 
isAttachedCheck if the internal state is "attached".- Specified by:
- isAttachedin interface- FileObject
- Returns:
- true if this is the case
 
- 
isContentOpenCheck if the content stream is open.- Specified by:
- isContentOpenin interface- FileObject
- Returns:
- true if this is the case
 
- 
isExecutableDetermines if this file is executable.- Specified by:
- isExecutablein interface- FileObject
- Returns:
- trueif this file is executable,- falseif not.
- Throws:
- FileSystemException- On error determining if this file exists.
 
- 
isFileChecks if this file is a regular file by using its file type.- Specified by:
- isFilein interface- FileObject
- Returns:
- true if this file is a regular file.
- Throws:
- FileSystemException- if an error occurs.
- See Also:
 
- 
isFolderChecks if this file is a folder by using its file type.- Specified by:
- isFolderin interface- FileObject
- Returns:
- true if this file is a regular file.
- Throws:
- FileSystemException- if an error occurs.
- See Also:
 
- 
isHiddenDetermines if this file can be read.- Specified by:
- isHiddenin interface- FileObject
- Returns:
- true if the file is a hidden file, false otherwise.
- Throws:
- FileSystemException- if an error occurs.
 
- 
isReadableDetermines if this file can be read.- Specified by:
- isReadablein interface- FileObject
- Returns:
- true if the file can be read, false otherwise.
- Throws:
- FileSystemException- if an error occurs.
 
- 
isSameFileChecks if this fileObject is the same file asdestFilejust with a different name. E.g. for case-insensitive file systems like windows.- Parameters:
- destFile- The file to compare to.
- Returns:
- true if the FileObjects are the same.
- Throws:
- FileSystemException- if an error occurs.
 
- 
isSymbolicLinkDetermines if this file can be read.- Specified by:
- isSymbolicLinkin interface- FileObject
- Returns:
- true if the file can be read, false otherwise.
- Throws:
- FileSystemException- if an error occurs.
- Since:
- 2.4
 
- 
isWriteableDetermines if this file can be written to.- Specified by:
- isWriteablein interface- FileObject
- Returns:
- true if the file can be written to, false otherwise.
- Throws:
- FileSystemException- if an error occurs.
 
- 
iteratorReturns an iterator over a set of all FileObject in this file object.- Specified by:
- iteratorin interface- Iterable<AFS extends AbstractFileSystem>
- Returns:
- an Iterator.
 
- 
listFilesLists the set of matching descendants of this file, in depthwise order.- Parameters:
- selector- The FileSelector.
- Returns:
- list of files or null if the base file (this object) do not exist or the selectoris null
- Throws:
- FileSystemException- if an error occurs.
 
- 
moveToMoves (rename) the file to another one.- Specified by:
- moveToin interface- FileObject
- Parameters:
- destFile- The target FileObject.
- Throws:
- FileSystemException- if an error occurs.
 
- 
notifyAllStreamsClosedCalled after this file-object closed all its streams.
- 
onChangeCalled when the type or content of this file changes.This implementation does nothing. - Throws:
- Exception- if an error occurs.
 
- 
onChildrenChangedCalled when the children of this file change. Allows subclasses to refresh any cached information about the children of this file.This implementation does nothing. - Parameters:
- child- The name of the child that changed.
- newType- The type of the file.
- Throws:
- Exception- if an error occurs.
 
- 
refreshThis will prepare the fileObject to get resynchronized with the underlying file system if required.- Specified by:
- refreshin interface- FileObject
- Throws:
- FileSystemException- if an error occurs.
 
- 
resolveFileFinds a file, relative to this file.- Specified by:
- resolveFilein interface- FileObject
- Parameters:
- path- The path of the file to locate. Can either be a relative path, which is resolved relative to this file, or an absolute path, which is resolved relative to the file system that contains this file.
- Returns:
- The FileObject.
- Throws:
- FileSystemException- if an error occurs.
 
- 
resolveFileReturns a child by name.- Specified by:
- resolveFilein interface- FileObject
- Parameters:
- name- The name of the child to locate.
- scope- the NameScope.
- Returns:
- The FileObject for the file or null if the child does not exist.
- Throws:
- FileSystemException- if an error occurs.
 
- 
setExecutableDescription copied from interface:FileObjectSets the owner's (or everybody's) write permission.- Specified by:
- setExecutablein interface- FileObject
- Parameters:
- readable- True to allow read access, false to disallow.
- ownerOnly- If- true, the permission applies only to the owner; otherwise, it applies to everybody.
- Returns:
- true if the operation succeeded.
- Throws:
- FileSystemException- On error determining if this file exists.
 
- 
setReadableDescription copied from interface:FileObjectSets the owner's (or everybody's) read permission.- Specified by:
- setReadablein interface- FileObject
- Parameters:
- readable- True to allow read access, false to disallow
- ownerOnly- If- true, the permission applies only to the owner; otherwise, it applies to everybody.
- Returns:
- true if the operation succeeded
- Throws:
- FileSystemException- On error determining if this file exists.
 
- 
setWritableDescription copied from interface:FileObjectSets the owner's (or everybody's) write permission.- Specified by:
- setWritablein interface- FileObject
- Parameters:
- readable- True to allow read access, false to disallow
- ownerOnly- If- true, the permission applies only to the owner; otherwise, it applies to everybody.
- Returns:
- true if the operation succeeded
- Throws:
- FileSystemException- On error determining if this file exists.
 
- 
toStringReturns the URI as a String.
 
-