| java.lang.Object org.apache.commons.vfs.provider.AbstractFileName
All known Subclasses: org.apache.commons.vfs.provider.LayeredFileName, org.apache.commons.vfs.provider.local.LocalFileName, org.apache.commons.vfs.provider.GenericFileName, org.apache.commons.vfs.impl.VirtualFileName,
AbstractFileName | abstract public class AbstractFileName implements FileName(Code) | | A default file name implementation.
author: Adam Murdoch version: $Revision: 537936 $ $Date: 2007-05-14 11:24:35 -0700 (Mon, 14 May 2007) $ |
appendRootUri | abstract protected void appendRootUri(StringBuffer buffer, boolean addPassword)(Code) | | Builds the root URI for this file name. Note that the root URI must not
end with a separator character.
|
checkName | public static boolean checkName(String basePath, String path, NameScope scope)(Code) | | Checks whether a path fits in a particular scope of another path.
Parameters: basePath - An absolute, normalised path. Parameters: path - An absolute, normalised path. |
compareTo | public int compareTo(Object obj)(Code) | | Implement Comparable
Parameters: obj - another abstractfilename |
equals | public boolean equals(Object obj)(Code) | | Determines if this object is equal to another.
|
getBaseName | public String getBaseName()(Code) | | Returns the base name of the file.
|
getDepth | public int getDepth()(Code) | | Returns the depth of this file name, within its file system.
|
getExtension | public String getExtension()(Code) | | Returns the extension of this file name.
|
getFriendlyURI | public String getFriendlyURI()(Code) | | returns a "friendly path", this is a path without a password.
|
getParent | public FileName getParent()(Code) | | Returns the name of the parent of the file.
|
getPath | public String getPath()(Code) | | Returns the absolute path of the file, relative to the root of the
file system that the file belongs to.
|
getRoot | public FileName getRoot()(Code) | | find the root of the filesystem
|
getRootURI | public String getRootURI()(Code) | | Returns the root URI of the file system this file belongs to.
|
getScheme | public String getScheme()(Code) | | Returns the URI scheme of this file.
|
getType | public FileType getType()(Code) | | Returns the requested or current type of this name.
The "requested" type is the one determined during resolving the name.
In this case the name is a
FileType.FOLDER if it ends with an "/" else
it will be a
FileType.FILE
Once attached it will be changed to reflect the real type of this resource.
FileType.FOLDER or FileType.FILE |
getURI | public String getURI()(Code) | | Returns the absolute URI of the file.
|
hashCode | public int hashCode()(Code) | | Returns the hashcode for this name.
|
isAncestor | public boolean isAncestor(FileName ancestor)(Code) | | Determines if another file name is an ancestor of this file name.
|
isDescendent | public boolean isDescendent(FileName descendent)(Code) | | Determines if another file name is a descendent of this file name.
|
isDescendent | public boolean isDescendent(FileName descendent, NameScope scope)(Code) | | Determines if another file name is a descendent of this file name.
|
toString | public String toString()(Code) | | Returns the URI of the file.
|
|
|