Class LocalFileSystem
java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractFileSystem
org.apache.commons.vfs2.provider.local.LocalFileSystem
- All Implemented Interfaces:
Closeable
,AutoCloseable
,FileSystem
,VfsComponent
A local file system.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalFileSystem
(FileName rootFileName, String rootFile, FileSystemOptions fileSystemOptions) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCapabilities
(Collection<Capability> caps) Returns the capabilities of this file system.protected FileObject
createFile
(AbstractFileName name) Creates a file object.protected File
doReplicateFile
(FileObject fileObject, FileSelector selector) Creates a temporary local copy of a file and its descendants.Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystem
addJunction, addListener, close, closeCommunicationLink, decorateFileObject, doCloseCommunicationLink, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
-
Constructor Details
-
LocalFileSystem
Constructs a new instance.- Parameters:
rootFileName
- The root file name of this file system.rootFile
- The root of this file system.fileSystemOptions
- Options to build this file system.
-
-
Method Details
-
addCapabilities
Returns the capabilities of this file system.- Specified by:
addCapabilities
in classAbstractFileSystem
- Parameters:
caps
- collections of Capabilities, can be immutable.
-
createFile
Creates a file object.- Specified by:
createFile
in classAbstractFileSystem
- Parameters:
name
- name referencing the new file.- Returns:
- new created FileObject.
- Throws:
FileSystemException
-
doReplicateFile
Creates a temporary local copy of a file and its descendants.- Overrides:
doReplicateFile
in classAbstractFileSystem
- Parameters:
fileObject
- the start of the tree.selector
- selection what to do with children.- Returns:
- replicated root file.
- Throws:
Exception
- any Exception is wrapped as FileSystemException.
-