|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.virtual.VFS
public class VFS
Virtual File System
Constructor Summary | |
---|---|
VFS(VFSContext context)
Create a new VFS. |
Method Summary | |
---|---|
static VirtualFile |
createNewRoot(URI rootURI)
Create new root |
static VirtualFile |
createNewRoot(URL rootURL)
Create new root |
boolean |
equals(Object obj)
|
VirtualFile |
findChild(String path)
Deprecated. use getChild, and handle null if not found |
VirtualFile |
getChild(String path)
Get a child |
List<VirtualFile> |
getChildren()
Get the children |
List<VirtualFile> |
getChildren(VirtualFileFilter filter)
Get the children |
List<VirtualFile> |
getChildrenRecursively()
Get all the children recursively |
List<VirtualFile> |
getChildrenRecursively(VirtualFileFilter filter)
Get all the children recursively |
VirtualFile |
getRoot()
Get the root file of this VFS |
static VirtualFile |
getRoot(URI rootURI)
Get the root virtual file |
static VirtualFile |
getRoot(URL rootURL)
Get the root virtual file |
static VFS |
getVFS(URI rootURI)
Get the virtual file system for a root uri |
static VFS |
getVFS(URL rootURL)
Get the virtual file system for a root url |
static VirtualFile |
getVirtualFile(URI rootURI,
String name)
Get a virtual file |
static VirtualFile |
getVirtualFile(URL rootURL,
String name)
Get a virtual file |
int |
hashCode()
|
static void |
init()
Initialize VFS protocol handlers package property. |
void |
setExceptionHandler(ExceptionHandler exceptionHandler)
Set exception handler. |
String |
toString()
|
protected void |
visit(VirtualFile file,
VirtualFileVisitor visitor)
Visit the virtual file system |
void |
visit(VirtualFileVisitor visitor)
Visit the virtual file system from the root |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public VFS(VFSContext context)
context
- the context
IllegalArgumentException
- for a null contextMethod Detail |
---|
public static void init()
public void setExceptionHandler(ExceptionHandler exceptionHandler)
exceptionHandler
- the exception handler.public static VFS getVFS(URI rootURI) throws IOException
rootURI
- the root URI
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURL is nullpublic static VirtualFile createNewRoot(URI rootURI) throws IOException
rootURI
- the root url
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURLpublic static VirtualFile getRoot(URI rootURI) throws IOException
rootURI
- the root uri
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURL is nullpublic static VirtualFile getVirtualFile(URI rootURI, String name) throws IOException
rootURI
- the root uriname
- the path name
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURL or name is nullpublic static VFS getVFS(URL rootURL) throws IOException
rootURL
- the root url
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURL is nullpublic static VirtualFile createNewRoot(URL rootURL) throws IOException
rootURL
- the root url
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURLpublic static VirtualFile getRoot(URL rootURL) throws IOException
rootURL
- the root url
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURLpublic static VirtualFile getVirtualFile(URL rootURL, String name) throws IOException
rootURL
- the root urlname
- the path name
IOException
- if there is a problem accessing the VFS
IllegalArgumentException
- if the rootURL or name is nullpublic VirtualFile getRoot() throws IOException
IOException
- for any problem accessing the VFS@Deprecated public VirtualFile findChild(String path) throws IOException
path
- the child path
IOException
- for any problem accessing the VFS (including the child does not exist)
IllegalArgumentException
- if the path is nullpublic VirtualFile getChild(String path) throws IOException
path
- the child path
null
if not found
IOException
- if a real problem occurspublic List<VirtualFile> getChildren() throws IOException
IOException
- for any problem accessing the virtual file systempublic List<VirtualFile> getChildren(VirtualFileFilter filter) throws IOException
filter
- to filter the children
IOException
- for any problem accessing the virtual file systempublic List<VirtualFile> getChildrenRecursively() throws IOException
This always uses VisitorAttributes.RECURSE
IOException
- for any problem accessing the virtual file systempublic List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws IOException
This always uses VisitorAttributes.RECURSE
filter
- to filter the children
IOException
- for any problem accessing the virtual file systempublic void visit(VirtualFileVisitor visitor) throws IOException
visitor
- the visitor
IOException
- for any problem accessing the VFS
IllegalArgumentException
- if the visitor is nullprotected void visit(VirtualFile file, VirtualFileVisitor visitor) throws IOException
file
- the filevisitor
- the visitor
IOException
- for any problem accessing the VFS
IllegalArgumentException
- if the file or visitor is nullpublic String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |