gnu.text
Class FilePath

java.lang.Object
  extended by gnu.text.Path
      extended by 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.


Field Summary
 
Fields inherited from class gnu.text.Path
defaultPath, userDirPath
 
Method Summary
static FilePath coerceToFilePathOrNull(java.lang.Object path)
           
 int compareTo(FilePath path)
           
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 boolean exists()
           
 Path getCanonical()
           
 long getContentLength()
           
 java.lang.String getLast()
           
 long getLastModified()
           
 Path getParent()
           
 java.lang.String getPath()
           
 java.lang.String getScheme()
           
 int hashCode()
           
 boolean isAbsolute()
           
 boolean isDirectory()
          Does this path name a directory? The default implementation returns true only if the path ends with '/' or the separatorChar.
static FilePath makeFilePath(java.lang.Object arg)
           
 java.io.InputStream openInputStream()
           
 java.io.OutputStream openOutputStream()
           
 Path resolve(java.lang.String relative)
           
 java.io.File toFile()
           
 java.lang.String toString()
           
 java.net.URI toURI()
           
 java.net.URL toURL()
           
static FilePath valueOf(java.io.File file)
           
static FilePath valueOf(java.lang.String str)
           
 
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
 

Method Detail

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