| 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<java.lang.String> |
getChildren()
Get a list of direct descendants 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. is it on the file system?
|
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<java.lang.String> getChildren()
ArrayList of VFSResourcespublic org.apache.commons.vfs2.FileContent getContent()
public java.lang.String getName()
public Resource clone(java.lang.String cloneName)
Resourcepublic static java.lang.String normalize(java.lang.String vfsURI)
vfsURI - dittopublic long getLastModified()
getLastModified in interface Resourcelong indicating last modified time.public long getContentLength()
getContentLength in interface Resourcelong 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.Objectpublic boolean isLocal()
Resourcepublic java.io.InputStream openStream()
throws java.io.IOException
ResourceopenStream in interface Resourcejava.io.IOException - if something goes wrongCopyright ©2007-2022 The Apache Software Foundation, Licensed under Apache License, Version 2.0.