|
||||||||||
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 | |
---|---|
boolean |
equals(java.lang.Object obj)
|
VirtualFile |
findChild(java.lang.String path)
Find a child from the root |
VirtualFile |
findChildFromRoot(java.lang.String path)
Deprecated. |
java.util.List<VirtualFile> |
getChildren()
Get the children |
java.util.List<VirtualFile> |
getChildren(VirtualFileFilter filter)
Get the children |
java.util.List<VirtualFile> |
getChildrenRecursively()
Get all the children recursively |
java.util.List<VirtualFile> |
getChildrenRecursively(VirtualFileFilter filter)
Get all the children recursively |
VirtualFile |
getRoot()
Get the root file of this VFS |
static VirtualFile |
getRoot(java.net.URI rootURI)
Get the root virtual file |
static VirtualFile |
getRoot(java.net.URL rootURL)
Get the root virtual file |
static VFS |
getVFS(java.net.URI rootURI)
Get the virtual file system for a root uri |
static VFS |
getVFS(java.net.URL rootURL)
Get the virtual file system for a root url |
static VirtualFile |
getVirtualFile(java.net.URI rootURI,
java.lang.String name)
Get a virtual file |
static VirtualFile |
getVirtualFile(java.net.URL rootURL,
java.lang.String name)
Get a virtual file |
int |
hashCode()
|
static void |
init()
|
java.lang.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
java.lang.IllegalArgumentException
- for a null contextMethod Detail |
---|
public static void init()
public static VFS getVFS(java.net.URI rootURI) throws java.io.IOException
rootURI
- the root URI
java.io.IOException
- if there is a problem accessing the VFS
java.lang.IllegalArgumentException
- if the rootURL is nullpublic static VirtualFile getRoot(java.net.URI rootURI) throws java.io.IOException
rootURI
- the root uri
java.io.IOException
- if there is a problem accessing the VFS
java.lang.IllegalArgumentException
- if the rootURLpublic static VirtualFile getVirtualFile(java.net.URI rootURI, java.lang.String name) throws java.io.IOException
rootURI
- the root uriname
- the path name
java.io.IOException
- if there is a problem accessing the VFS
java.lang.IllegalArgumentException
- if the rootURL or name is nullpublic static VFS getVFS(java.net.URL rootURL) throws java.io.IOException
rootURL
- the root url
java.io.IOException
- if there is a problem accessing the VFS
java.lang.IllegalArgumentException
- if the rootURL is nullpublic static VirtualFile getRoot(java.net.URL rootURL) throws java.io.IOException
rootURL
- the root url
java.io.IOException
- if there is a problem accessing the VFS
java.lang.IllegalArgumentException
- if the rootURLpublic static VirtualFile getVirtualFile(java.net.URL rootURL, java.lang.String name) throws java.io.IOException
rootURL
- the root urlname
- the path name
java.io.IOException
- if there is a problem accessing the VFS
java.lang.IllegalArgumentException
- if the rootURL or name is nullpublic VirtualFile getRoot() throws java.io.IOException
java.io.IOException
- for any problem accessing the VFSpublic VirtualFile findChild(java.lang.String path) throws java.io.IOException
path
- the child path
java.io.IOException
- for any problem accessing the VFS (including the child does not exist)
java.lang.IllegalArgumentException
- if the path is null@Deprecated public VirtualFile findChildFromRoot(java.lang.String path) throws java.io.IOException
path
- the child path
java.io.IOException
- for any problem accessing the VFS (including the child does not exist)
java.lang.IllegalArgumentException
- if the path is nullpublic java.util.List<VirtualFile> getChildren() throws java.io.IOException
java.io.IOException
- for any problem accessing the virtual file system
java.lang.IllegalStateException
- if the root is a leaf nodepublic java.util.List<VirtualFile> getChildren(VirtualFileFilter filter) throws java.io.IOException
filter
- to filter the children
java.io.IOException
- for any problem accessing the virtual file system
java.lang.IllegalStateException
- if the root is a leaf nodepublic java.util.List<VirtualFile> getChildrenRecursively() throws java.io.IOException
This always uses VisitorAttributes.RECURSE
java.io.IOException
- for any problem accessing the virtual file system
java.lang.IllegalStateException
- if the root is a leaf nodepublic java.util.List<VirtualFile> getChildrenRecursively(VirtualFileFilter filter) throws java.io.IOException
This always uses VisitorAttributes.RECURSE
filter
- to filter the children
java.io.IOException
- for any problem accessing the virtual file system
java.lang.IllegalStateException
- if the root is a leaf nodepublic void visit(VirtualFileVisitor visitor) throws java.io.IOException
visitor
- the visitor
java.io.IOException
- for any problem accessing the VFS
java.lang.IllegalArgumentException
- if the visitor is null
java.lang.IllegalStateException
- if the root is a leaf nodeprotected void visit(VirtualFile file, VirtualFileVisitor visitor) throws java.io.IOException
file
- the filevisitor
- the visitor
java.io.IOException
- for any problem accessing the VFS
java.lang.IllegalArgumentException
- if the file or visitor is null
java.lang.IllegalStateException
- if the root is a leaf nodepublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |