|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.File
edu.tum.cs.commons.filesystem.CanonicalFile
public class CanonicalFile
This class represents files that are guaranteed to be canonical. For this
class methods getPath(), getAbsolutePath() and
getCanonicalPath() all return the same (canonical) path.
| Field Summary |
|---|
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
|---|---|
CanonicalFile(File file)
Create new canonical file from existing file. |
|
CanonicalFile(File parent,
String child)
Create new canonical file. |
|
CanonicalFile(String pathname)
Create new canonical file. |
|
CanonicalFile(String parent,
String child)
Create new canonical file. |
|
CanonicalFile(URI uri)
Create new canonical file. |
|
| Method Summary | |
|---|---|
CanonicalFile |
getAbsoluteFile()
Deprecated. |
String |
getAbsolutePath()
Deprecated. |
CanonicalFile |
getCanonicalFile()
Returns the canonical file itself. |
String |
getCanonicalPath()
This method is overridden to save effort for call to File.getCanonicalPath(). |
String |
getExtension()
Returns the extension of the file. |
CanonicalFile |
getParentFile()
Same as File.getParentFile() but returns a canonical file. |
String |
getPath()
Deprecated. |
boolean |
isReadableFile()
Checks if this file is a file an can be read. |
CanonicalFile[] |
listFiles()
Same as File.listFiles() but returns canonical files. |
CanonicalFile[] |
listFiles(FileFilter filter)
Same as File.listFiles(FileFilter) but returns canonical files. |
CanonicalFile[] |
listFiles(FilenameFilter filter)
Same as File.listFiles(FilenameFilter) but returns canonical
files. |
| Methods inherited from class java.io.File |
|---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getFreeSpace, getName, getParent, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CanonicalFile(File file)
throws IOException
IOException
public CanonicalFile(String pathname)
throws IOException
IOExceptionFile.File(String)
public CanonicalFile(File parent,
String child)
throws IOException
IOExceptionFile.File(File, String)
public CanonicalFile(String parent,
String child)
throws IOException
IOExceptionFile.File(String, String)
public CanonicalFile(URI uri)
throws IOException
IOExceptionFile.File(URI)| Method Detail |
|---|
@Deprecated public CanonicalFile getAbsoluteFile()
getCanonicalFile() for
consistency reasons.
getAbsoluteFile in class Filepublic CanonicalFile getCanonicalFile()
getCanonicalFile in class Filepublic CanonicalFile[] listFiles()
File.listFiles() but returns canonical files. If for some
strange reason the files below a canonical file cannot be canonized, this
may throw an AssertionError.
listFiles in class Filepublic CanonicalFile[] listFiles(FileFilter filter)
File.listFiles(FileFilter) but returns canonical files.
If for some strange reason the files below a canonical file cannot be
canonized, this may throw an AssertionError.
listFiles in class Filepublic CanonicalFile[] listFiles(FilenameFilter filter)
File.listFiles(FilenameFilter) but returns canonical
files. If for some strange reason the files below a canonical file cannot
be canonized, this may throw an AssertionError.
listFiles in class Filepublic CanonicalFile getParentFile()
File.getParentFile() but returns a canonical file. If for
some strange reason the parent file of a canonical file cannot be
canonized, this may throw an AssertionError.
getParentFile in class Filepublic boolean isReadableFile()
public String getCanonicalPath()
File.getCanonicalPath().
getCanonicalPath in class File@Deprecated public String getAbsolutePath()
File.getAbsolutePath(). Use getCanonicalPath() for
consistency reasons.
getAbsolutePath in class File@Deprecated public String getPath()
getCanonicalPath() for consistency reasons.
getPath in class Filepublic String getExtension()
null, if the file has no extension (i.e. if a
filename contains no '.'), returns the empty string if the '.' is
the filename's last character.
|
TUM CCSM Commons | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||