Package thredds.inventory
Interface MFile
-
- All Superinterfaces:
Comparable<MFile>
public interface MFile extends Comparable<MFile>
An abstraction for java.io.File / java.nio.file.Path- Since:
- Jun 30, 2009
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intcompareTo(MFile o)ObjectgetAuxInfo()longgetLastModified()Get time of last modification at the time the MFile object was createdlonggetLength()Size of file in bytesStringgetName()The name is the farthest element from the root in the directory hierarchy.MFilegetParent()Get the parent of thisStringgetPath()Get full path name, replace \\ with /booleanisDirectory()default booleanisReadable()voidsetAuxInfo(Object info)
-
-
-
Method Detail
-
getLastModified
long getLastModified()
Get time of last modification at the time the MFile object was created- Returns:
- time of last modification in Unix time (msecs since reference), or -1 if unknown
-
getLength
long getLength()
Size of file in bytes- Returns:
- Size of file in bytes or -1 if unknown
-
isDirectory
boolean isDirectory()
-
isReadable
default boolean isReadable()
-
getPath
String getPath()
Get full path name, replace \\ with /- Returns:
- full path name
-
getName
String getName()
The name is the farthest element from the root in the directory hierarchy.- Returns:
- the file name
-
getParent
MFile getParent() throws IOException
Get the parent of this- Returns:
- the parent or null
- Throws:
IOException
-
compareTo
int compareTo(MFile o)
- Specified by:
compareToin interfaceComparable<MFile>
-
getAuxInfo
Object getAuxInfo()
-
setAuxInfo
void setAuxInfo(Object info)
-
-