gnu.text
Class FilePath
java.lang.Object
gnu.text.Path
gnu.text.FilePath
- All Implemented Interfaces:
- java.lang.Comparable
public class FilePath
- extends Path
- implements java.lang.Comparable
A wrapper around a java.io.File
that extends Path
.
Methods inherited from class gnu.text.Path |
coerceToPathOrNull, currentPath, getAbsolute, getAuthority, getDirectory, getExtension, getFragment, getHost, getPort, getQuery, getUserInfo, openInputStream, relativize, resolve, setCurrentPath, toURIString, toURL, uriSchemeLength, uriSchemeSpecified, valueOf |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
valueOf
public static FilePath valueOf(java.lang.String str)
valueOf
public static FilePath valueOf(java.io.File file)
coerceToFilePathOrNull
public static FilePath coerceToFilePathOrNull(java.lang.Object path)
makeFilePath
public static FilePath makeFilePath(java.lang.Object arg)
isAbsolute
public boolean isAbsolute()
- Specified by:
isAbsolute
in class Path
isDirectory
public boolean isDirectory()
- Description copied from class:
Path
- Does this path name a directory?
The default implementation returns true only if the path ends
with '/' or the separatorChar.
- Overrides:
isDirectory
in class Path
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in class Path
exists
public boolean exists()
- Overrides:
exists
in class Path
getContentLength
public long getContentLength()
- Overrides:
getContentLength
in class Path
getPath
public java.lang.String getPath()
- Specified by:
getPath
in class Path
getLast
public java.lang.String getLast()
- Overrides:
getLast
in class Path
getParent
public Path getParent()
- Overrides:
getParent
in class Path
compareTo
public int compareTo(FilePath path)
compareTo
public int compareTo(java.lang.Object obj)
- Specified by:
compareTo
in interface java.lang.Comparable
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
toFile
public java.io.File toFile()
toURL
public java.net.URL toURL()
- Specified by:
toURL
in class Path
toURI
public java.net.URI toURI()
- Specified by:
toURI
in class Path
openInputStream
public java.io.InputStream openInputStream()
throws java.io.IOException
- Specified by:
openInputStream
in class Path
- Throws:
java.io.IOException
openOutputStream
public java.io.OutputStream openOutputStream()
throws java.io.IOException
- Specified by:
openOutputStream
in class Path
- Throws:
java.io.IOException
getScheme
public java.lang.String getScheme()
- Specified by:
getScheme
in class Path
resolve
public Path resolve(java.lang.String relative)
- Specified by:
resolve
in class Path
getCanonical
public Path getCanonical()
- Overrides:
getCanonical
in class Path