Constructor and Description |
---|
VfsResource(java.lang.String vfsURI,
org.apache.commons.vfs2.FileSystemManager fsManager) |
Modifier and Type | Method and Description |
---|---|
Resource |
clone(java.lang.String cloneName)
Clones this resource with a new resource with a different name
|
boolean |
exists()
Flag indicating whether a resource is available for querying
|
java.util.List |
getChildren()
Get a list of direct descendents of the given resource.
|
org.apache.commons.vfs2.FileContent |
getContent() |
long |
getContentLength()
Get the size of the resource
|
long |
getLastModified()
Get the last modification time of the resource.
|
java.lang.String |
getName()
Get the name of the resource.
|
boolean |
isLocal()
Is this resource local to this host, i.e.
|
static java.lang.String |
normalize(java.lang.String vfsURI)
The VFS FileName getURI method seems to have a bug in it where file: URIs will have 4 forward
slashes instead of 3.
|
java.io.InputStream |
openStream()
Opens a stream on this resource
|
boolean |
physicallyExists()
Return a flag indicating whether a provided VFS resource physically exists
|
java.lang.String |
toString() |
public VfsResource(java.lang.String vfsURI, org.apache.commons.vfs2.FileSystemManager fsManager)
public java.util.List getChildren()
ArrayList
of VFSResourcespublic org.apache.commons.vfs2.FileContent getContent()
public java.lang.String getName()
public Resource clone(java.lang.String cloneName)
Resource
public static java.lang.String normalize(java.lang.String vfsURI)
vfsURI
- public long getLastModified()
getLastModified
in interface Resource
long
indicating last modified time.public long getContentLength()
getContentLength
in interface Resource
long
representing the size of the resource (in bytes).public boolean exists()
public boolean physicallyExists()
true
if the resource physically exists, false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isLocal()
Resource
public java.io.InputStream openStream() throws java.io.IOException
Resource
openStream
in interface Resource
java.io.IOException