|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lightdev.lib.filesystem.FileRef
public class FileRef
A reference to a file consisting of the file's absolute path and additional information about whether or not the referenced file is a directory, is hidden, etc. Note that FileRef only references a file, the file itself and its contents are not modelled by this class.
| Constructor Summary | |
|---|---|
FileRef(String absolutePath)
Create a new instance of class FileRef with a given absolute path. |
|
FileRef(String absolutePath,
boolean isDirectory)
Create a new instance of class FileRef with a given absolute path
and an indicator whether or not the new FileRef denotes a directory. |
|
FileRef(String absolutePath,
boolean isDirectory,
boolean isHidden,
long lastModified,
long length)
create a new instance of FileRef. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Indicates whether some object is equal to this instance of class FileRef. |
String |
getAbsolutePath()
get the absolute path that denotes this file |
long |
getLastModified()
Returns the time that this file was last modified. |
long |
getLength()
Returns the length of this file. |
String |
getName(String separatorChar)
get the name of this file without path |
boolean |
isDirectory()
Tests whether the file denoted by this abstract pathname is a directory. |
boolean |
isFile()
Tests whether the file denoted by this abstract pathname is a file. |
boolean |
isHidden()
Tests whether the file denoted by this abstract pathname is a hidden file. |
String |
toString()
get a string representation of this instance of FileRef |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileRef(String absolutePath,
boolean isDirectory,
boolean isHidden,
long lastModified,
long length)
FileRef. Note that the created FileRef is
only a reference to a file, the file itself will not be created.
absolutePath - the absolute path that denotes this instance of FileRefisDirectory - whether or not this file is a directoryisHidden - whether or not this file is a hidden filelastModified - the date/time this file was last modified measured in milliseconds
since the epoch (00:00:00 GMT, January 1, 1970)length - the length of this file in bytespublic FileRef(String absolutePath)
FileRef with a given absolute path.
Other characteristics of the file are created with default settings
(i.e. not a directory, not hidden, unknown modification date
and length). Note that the created FileRef is only a reference to a file, the file
itself will not be created.
absolutePath - the absolute path that denotes this instance
of FileRef
public FileRef(String absolutePath,
boolean isDirectory)
FileRef with a given absolute path
and an indicator whether or not the new FileRef denotes a directory.
Other characteristics of the file are created with default settings
(i.e. not hidden, unknown modification date and length). Note that the created
FileRef is only a reference to a file, the file itself will not be created.
absolutePath - the absolute path that denotes this instance
of FileRefisDirectory - true, if the file to create should denote a directory| Method Detail |
|---|
public String getAbsolutePath()
public boolean isDirectory()
true if this file is a directory,
false otherwisepublic boolean isFile()
true if this file is a file,
false otherwisepublic boolean isHidden()
true if this file is a hidden file,
false otherwisepublic long getLastModified()
long value representing the time the file was
last modified, measured in milliseconds since the epoch
(00:00:00 GMT, January 1, 1970)public long getLength()
public String getName(String separatorChar)
separatorChar - the string that is used to separate directories and file names in
path expressions
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectobj - the object to compare with this instance of FileRef
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||