org.jboss.virtual.plugins.context.file
Class FileSystemContext
java.lang.Object
org.jboss.virtual.plugins.context.AbstractVFSContext
org.jboss.virtual.plugins.context.file.FileSystemContext
- All Implemented Interfaces:
- VFSContext
- Direct Known Subclasses:
- TempContext
public class FileSystemContext
- extends AbstractVFSContext
FileSystemContext.
Jar archives are processed through ZipEntryContext
.
To switch back to JarHandler
set a system property jboss.vfs.forceVfsJar=true
Explicit case sensitive path checking can be turned on by adding an option parameter
?caseSensitive=true to context URL. This may be desired when native filesystem is not
case sensitive (i.e. if running on Windows).
Case sesitivity can be turned on for all context URLs by setting system property
jboss.vfs.forceCaseSensitive=true.
- Version:
- $Revision: 1.1 $
- Author:
- Adrian Brock, Ales Justin, Marko Strukelj
Field Summary |
protected static org.jboss.logging.Logger |
staticLog
|
Methods inherited from class org.jboss.virtual.plugins.context.AbstractVFSContext |
addTempInfo, cleanupTempInfo, createNewOptions, equals, getChild, getChildren, getChildURL, getExceptionHandler, getFurthestParentTemp, getOption, getOption, getOption, getOptions, getPeerContext, getRootPeer, getRootURI, getTempInfo, getTempInfos, getVFS, hashCode, setExceptionHandler, setOption, setOptionsToURL, setRootPeer, toString, visit, visit |
staticLog
protected static final org.jboss.logging.Logger staticLog
FileSystemContext
public FileSystemContext(URL rootURL)
throws IOException,
URISyntaxException
- Create a new FileSystemContext.
- Parameters:
rootURL
- the root url
- Throws:
IOException
- for an error accessing the file system
URISyntaxException
- for an error parsing the uri
FileSystemContext
public FileSystemContext(URI rootURI)
throws IOException,
URISyntaxException
- Create a new FileSystemContext.
- Parameters:
rootURI
- the root uri
- Throws:
IOException
- for an error accessing the file system
URISyntaxException
- if cannot create URI
FileSystemContext
public FileSystemContext(File file)
throws IOException,
URISyntaxException
- Create a new FileSystemContext.
- Parameters:
file
- the root file
- Throws:
IOException
- for an error accessing the file system
IllegalArgumentException
- for a null file
URISyntaxException
- for an error parsing the uri
getConstraints
public Set<VFSContextConstraints> getConstraints()
- Description copied from interface:
VFSContext
- Get context's constraints.
- Specified by:
getConstraints
in interface VFSContext
- Overrides:
getConstraints
in class AbstractVFSContext
- Returns:
- the constraints
getName
public String getName()
- Description copied from interface:
VFSContext
- Get the name.
- Returns:
- the name
getRoot
public VirtualFileHandler getRoot()
throws IOException
- Description copied from interface:
VFSContext
- Return the root virtual file
- Returns:
- the root
- Throws:
IOException
- for any problem accessing the VFS
createVirtualFileHandler
public VirtualFileHandler createVirtualFileHandler(VirtualFileHandler parent,
File file)
throws IOException
- Create a new virtual file handler
- Parameters:
parent
- the parentfile
- the file
- Returns:
- the handler
- Throws:
IOException
- for any error accessing the file system
IllegalArgumentException
- for a null file
mountZipFS
protected DelegatingHandler mountZipFS(VirtualFileHandler parent,
String name,
File file)
throws IOException,
URISyntaxException
- Create zip file system.
- Parameters:
parent
- the parentname
- the namefile
- the file
- Returns:
- new zip fs delegating handler
- Throws:
IOException
- for any error
URISyntaxException
- for any URI syntax error
createVirtualFileHandler
public VirtualFileHandler createVirtualFileHandler(VirtualFileHandler parent,
File file,
URI uri)
throws IOException
- Create a new virtual file handler
- Parameters:
parent
- the parentfile
- the fileuri
- the uri
- Returns:
- the handler
- Throws:
IOException
- for any error accessing the file system
IllegalArgumentException
- for a null file
exists
protected boolean exists(File file)
throws IOException
- Tests if file exists taking case sensitivity into account - if it's enabled
- Parameters:
file
- file to check
- Returns:
- true if file exists
- Throws:
IOException
- for any error
isForcedCaseSensitive
public boolean isForcedCaseSensitive()
- Is forceCaseSensitive enabled
Only relevant for native filesystems
that are not case sensitive
- Returns:
- true if case sensitivity is enabled
Copyright © 2009 JBoss, A division of Red Hat, Inc. All Rights Reserved.