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
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCapabilities
(Collection caps) Adds the capabilities of this file system.void
addJunction
(String junctionPoint, FileObject targetFile) Adds a junction to this file system.protected FileObject
createFile
(FileName name) Creates a file object.void
removeJunction
(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 Details
-
VirtualFileSystem
-
-
Method Details
-
addCapabilities
Adds the capabilities of this file system.- Specified by:
addCapabilities
in classAbstractFileSystem
-
createFile
Creates a file object. This method is called only if the requested file is not cached.- Specified by:
createFile
in classAbstractFileSystem
- Throws:
Exception
-
addJunction
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
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.
-