gnu.text

Class FilePath

Implemented Interfaces:
Comparable

public class FilePath
extends Path
implements Comparable

A wrapper around a java.io.File that extends Path.

Field Summary

Fields inherited from class gnu.text.Path

defaultPath, userDirPath

Method Summary

//
FilePath Path getParent()
static FilePath
coerceToFilePathOrNull(Object path)
int
compareTo(Object obj)
int
compareTo(FilePath path)
boolean
equals(Object obj)
boolean
exists()
Path
getCanonical()
long
getContentLength()
String
getLast()
long
getLastModified()
String
getPath()
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(Object arg)
InputStream
openInputStream()
OutputStream
openOutputStream()
Path
resolve(String relative)
File
toFile()
String
toString()
URI
toURI()
URL
toURL()
static FilePath
valueOf(File file)
static FilePath
valueOf(String str)

Methods inherited from class gnu.text.Path

coerceToPathOrNull, currentPath, exists, getAbsolute, getAuthority, getCanonical, getContentLength, getDirectory, getExtension, getFragment, getHost, getLast, getLastModified, getParent, getPath, getPort, getQuery, getScheme, getUserInfo, isAbsolute, isDirectory, openInputStream, openInputStream, openOutputStream, relativize, resolve, resolve, setCurrentPath, toURI, toURIString, toURL, toURL, uriSchemeLength, uriSchemeSpecified, valueOf

Method Details

FilePath Path getParent

public // FilePath
  
  Path
  
  getParent()

coerceToFilePathOrNull

public static FilePath coerceToFilePathOrNull(Object path)

compareTo

public int compareTo(Object obj)

compareTo

public int compareTo(FilePath path)

equals

public boolean equals(Object obj)

exists

public boolean exists()
Overrides:
exists in interface Path

getCanonical

public Path getCanonical()
Overrides:
getCanonical in interface Path

getContentLength

public long getContentLength()
Overrides:
getContentLength in interface Path

getLast

public String getLast()
Overrides:
getLast in interface Path

getLastModified

public long getLastModified()
Overrides:
getLastModified in interface Path

getPath

public String getPath()
Overrides:
getPath in interface Path

getScheme

public String getScheme()
Overrides:
getScheme in interface Path

hashCode

public int hashCode()

isAbsolute

public boolean isAbsolute()
Overrides:
isAbsolute in interface Path

isDirectory

public boolean isDirectory()
Does this path name a directory? The default implementation returns true only if the path ends with '/' or the separatorChar.
Overrides:
isDirectory in interface Path

makeFilePath

public static FilePath makeFilePath(Object arg)

openInputStream

public InputStream openInputStream()
            throws IOException
Overrides:
openInputStream in interface Path

openOutputStream

public OutputStream openOutputStream()
            throws IOException
Overrides:
openOutputStream in interface Path

resolve

public Path resolve(String relative)
Overrides:
resolve in interface Path

toFile

public File toFile()

toString

public String toString()

toURI

public URI toURI()
Overrides:
toURI in interface Path

toURL

public URL toURL()
Overrides:
toURL in interface Path

valueOf

public static FilePath valueOf(File file)

valueOf

public static FilePath valueOf(String str)