@ThreadSafe public class MFileOS7 extends Object implements MFile
Constructor and Description |
---|
MFileOS7(Path path) |
MFileOS7(Path path,
BasicFileAttributes attr) |
MFileOS7(String filename) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MFile o) |
Object |
getAuxInfo() |
static MFileOS7 |
getExistingFile(String filename)
Make MFileOS7 if file exists, otherwise return null
|
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.
|
Path |
getNioPath() |
MFile |
getParent()
Get the parent of this
|
String |
getPath()
Get full path name, replace \\ with /
|
boolean |
isDirectory() |
void |
setAuxInfo(Object auxInfo) |
String |
toString() |
public MFileOS7(Path path) throws IOException
IOException
public MFileOS7(Path path, BasicFileAttributes attr)
public MFileOS7(String filename) throws IOException
IOException
public static MFileOS7 getExistingFile(String filename) throws IOException
filename
- full path nameIOException
public long getLastModified()
MFile
getLastModified
in interface MFile
public long getLength()
MFile
public boolean isDirectory()
isDirectory
in interface MFile
public String getPath()
MFile
public String getName()
MFile
public MFile getParent() throws IOException
MFile
getParent
in interface MFile
IOException
public int compareTo(MFile o)
compareTo
in interface Comparable<MFile>
compareTo
in interface MFile
public Object getAuxInfo()
getAuxInfo
in interface MFile
public void setAuxInfo(Object auxInfo)
setAuxInfo
in interface MFile
public Path getNioPath()
Copyright © 1999–2018 UCAR/Unidata. All rights reserved.