Package org.apache.commons.vfs.impl
Class VirtualFileSystem
- java.lang.Object
-
- org.apache.commons.vfs.provider.AbstractVfsComponent
-
- org.apache.commons.vfs.provider.AbstractFileSystem
-
- org.apache.commons.vfs.impl.VirtualFileSystem
-
- All Implemented Interfaces:
FileSystem
,VfsComponent
public class VirtualFileSystem extends AbstractFileSystem
A logical file system, made up of set of junctions, or links, to files from other file systems.- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Adam Murdoch
-
-
Constructor Summary
Constructors Constructor Description VirtualFileSystem(FileName rootName, FileSystemOptions fileSystemOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addCapabilities(java.util.Collection caps)
Adds the capabilities of this file system.void
addJunction(java.lang.String junctionPoint, FileObject targetFile)
Adds a junction to this file system.protected FileObject
createFile(FileName name)
Creates a file object.void
removeJunction(java.lang.String junctionPoint)
Removes a junction from this file system.-
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileSystem
addListener, close, closeCommunicationLink, decorateFileObject, doCloseCommunicationLink, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeListener, replicateFile, resolveFile, resolveFile, setAttribute
-
Methods inherited from class org.apache.commons.vfs.provider.AbstractVfsComponent
getContext, getLogger, setContext, setLogger
-
-
-
-
Constructor Detail
-
VirtualFileSystem
public VirtualFileSystem(FileName rootName, FileSystemOptions fileSystemOptions)
-
-
Method Detail
-
addCapabilities
protected void addCapabilities(java.util.Collection caps)
Adds the capabilities of this file system.- Specified by:
addCapabilities
in classAbstractFileSystem
-
createFile
protected FileObject createFile(FileName name) throws java.lang.Exception
Creates a file object. This method is called only if the requested file is not cached.- Specified by:
createFile
in classAbstractFileSystem
- Throws:
java.lang.Exception
-
addJunction
public void addJunction(java.lang.String junctionPoint, FileObject targetFile) throws FileSystemException
Adds a junction to this file system.- Specified by:
addJunction
in interfaceFileSystem
- Overrides:
addJunction
in classAbstractFileSystem
- Parameters:
junctionPoint
- The point in this file system to add the junction.targetFile
- The file to link to.- Throws:
FileSystemException
- If this file system does not support junctions, or the junction point or target file is invalid (the file system may not support nested junctions, for example).
-
removeJunction
public void removeJunction(java.lang.String junctionPoint) throws FileSystemException
Removes a junction from this file system.- Specified by:
removeJunction
in interfaceFileSystem
- Overrides:
removeJunction
in classAbstractFileSystem
- Parameters:
junctionPoint
- The junction to remove.- Throws:
FileSystemException
- On error removing the junction.
-
-