@ThreadSafe public class MFileOS extends Object implements MFile
| Constructor and Description |
|---|
MFileOS(File file) |
MFileOS(String filename) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MFile o) |
Object |
getAuxInfo() |
static MFileOS |
getExistingFile(String filename)
Make MFileOS if file exists, otherwise return null
|
File |
getFile() |
long |
getLastModified()
Get time of last modification at the time the MFile object was created
|
long |
getLength()
Size of file in bytes
|
String |
getName()
The name is the farthest element from the root in the directory hierarchy.
|
MFile |
getParent()
Get the parent of this
|
String |
getPath()
Get full path name, replace \\ with /
|
boolean |
isDirectory() |
void |
setAuxInfo(Object auxInfo) |
String |
toString() |
public static MFileOS getExistingFile(String filename)
filename - name of the existing file.public long getLastModified()
MFilegetLastModified in interface MFilepublic long getLength()
MFilepublic boolean isDirectory()
isDirectory in interface MFilepublic String getPath()
MFilepublic String getName()
MFilepublic int compareTo(MFile o)
compareTo in interface Comparable<MFile>compareTo in interface MFilepublic Object getAuxInfo()
getAuxInfo in interface MFilepublic void setAuxInfo(Object auxInfo)
setAuxInfo in interface MFilepublic File getFile()