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:
FileSystem
,VfsComponent
public class LocalFileSystem extends AbstractFileSystem
A local file system.
-
-
Constructor Summary
Constructors Constructor Description LocalFileSystem(FileName rootName, java.lang.String rootFile, FileSystemOptions opts)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addCapabilities(java.util.Collection<Capability> caps)
Returns the capabilities of this file system.protected FileObject
createFile(AbstractFileName name)
Creates a file object.protected java.io.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 Detail
-
LocalFileSystem
public LocalFileSystem(FileName rootName, java.lang.String rootFile, FileSystemOptions opts)
-
-
Method Detail
-
createFile
protected FileObject createFile(AbstractFileName name) throws FileSystemException
Creates a file object.- Specified by:
createFile
in classAbstractFileSystem
- Parameters:
name
- name referencing the new file.- Returns:
- new created FileObject.
- Throws:
FileSystemException
-
addCapabilities
protected void addCapabilities(java.util.Collection<Capability> caps)
Returns the capabilities of this file system.- Specified by:
addCapabilities
in classAbstractFileSystem
- Parameters:
caps
- collections of Capabilities, can be immutable.
-
doReplicateFile
protected java.io.File doReplicateFile(FileObject fileObject, FileSelector selector) throws java.lang.Exception
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 childs.- Returns:
- replicated root file.
- Throws:
java.lang.Exception
- any Exception is wrapped as FileSystemException.
-
-