Class LocalFileName
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileName
org.apache.commons.vfs2.provider.local.LocalFileName
- All Implemented Interfaces:
Comparable<FileName>, FileName
- Direct Known Subclasses:
WindowsFileName
A local file URI.
-
Field Summary
Fields inherited from interface FileName
ROOT_PATH, SEPARATOR, SEPARATOR_CHAR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLocalFileName(String scheme, String rootFile, String path, FileType type) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendRootUri(StringBuilder buffer, boolean addPassword) Builds the root URI for this file name.createName(String path, FileType type) Factory method for creating name instances.returns a "friendly path", this is a path without a password.Returns the root file for this file.getURI()Returns the absolute URI of the file.toString()Returns the decoded URI of the file.Methods inherited from class AbstractFileName
checkName, compareTo, createURI, equals, getBaseName, getDepth, getExtension, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getScheme, getType, getUriTrailer, hashCode, isAncestor, isDescendent, isDescendent, isFile
-
Constructor Details
-
LocalFileName
-
-
Method Details
-
getRootFile
-
createName
Factory method for creating name instances.- Specified by:
createNamein classAbstractFileName- Parameters:
path- The file path.type- The file type.- Returns:
- The FileName.
-
getURI
-
getFriendlyURI
returns a "friendly path", this is a path without a password.- Specified by:
getFriendlyURIin interfaceFileName- Overrides:
getFriendlyURIin classAbstractFileName- Returns:
- The "friendly" URI.
-
toString
Returns the decoded URI of the file.- Overrides:
toStringin classAbstractFileName- Returns:
- the FileName as a URI.
-
appendRootUri
Builds the root URI for this file name.- Specified by:
appendRootUriin classAbstractFileName- Parameters:
buffer- A StringBuilder to use to construct the URI.addPassword- true if the password should be added, false otherwise.
-