public class RelativePathFile
extends java.io.File
implements java.lang.Cloneable, java.io.Serializable
| Constructor and Description |
|---|
RelativePathFile(java.io.File file,
java.io.File rootPath)
Constructor 3.
|
RelativePathFile(java.lang.String filename,
java.io.File rootPath)
Constructor 2.
|
RelativePathFile(java.lang.String filename,
java.lang.String rootPathname)
Constructor 1.
|
| Modifier and Type | Method and Description |
|---|---|
RelativePathFile |
clone()
This method returns a deep clone of the RelativePathFile.
|
int |
compareTo(java.io.File pathName) |
protected java.util.Vector<java.lang.String> |
getRelativePartsVector() |
java.lang.String |
getRelativePath() |
protected java.lang.String |
getRootPathname() |
boolean |
include(RelativePathFile file)
This method checks if this relative path file has a path that includes the file specified in parameter.
|
protected void |
setRelativeTo(java.lang.String rootPathname) |
canExecute, canRead, canWrite, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURLpublic RelativePathFile(java.lang.String filename,
java.lang.String rootPathname)
filename - the filename of the file to be relative to the reference directoryrootPathname - the reference directory from which the file is relativepublic RelativePathFile(java.lang.String filename,
java.io.File rootPath)
filename - the filename of the file to be relative to the reference directoryrootPath - the reference directory from which the file is relativepublic RelativePathFile(java.io.File file,
java.io.File rootPath)
file - the file to be relative to the reference directoryrootPath - the reference directory from which the file is relativeprotected void setRelativeTo(java.lang.String rootPathname)
public java.lang.String getRelativePath()
public int compareTo(java.io.File pathName)
compareTo in interface java.lang.Comparable<java.io.File>compareTo in class java.io.Fileprotected java.util.Vector<java.lang.String> getRelativePartsVector()
protected java.lang.String getRootPathname()
public boolean include(RelativePathFile file)
file - a RelativePathFile instancepublic RelativePathFile clone()
clone in class java.lang.Object