| Modifier and Type | Field and Description |
|---|---|
java.io.File |
directory |
int |
index |
long |
lastModified |
long |
length |
java.lang.String |
name |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MFile o) |
boolean |
exists()
Check if the MFile exists
|
java.lang.Object |
getAuxInfo() |
GcMFile |
getChild(java.lang.String newFilename)
Get child MFile of this MFile
|
java.io.File |
getDirectory() |
java.io.FileInputStream |
getInputStream()
Get the MFile InputStream
|
long |
getLastModified()
Get time of last modification at the time the MFile object was created
|
long |
getLength()
Size of file in bytes
|
java.lang.String |
getName()
The name is the farthest element from the root in the directory hierarchy.
|
MFile |
getParent()
Get the parent of this
|
java.lang.String |
getPath()
Get full path name, replace \\ with /
|
boolean |
isDirectory() |
java.lang.String |
relativize(MFile other)
Construct a relative path between this MFile and a given MFile.
|
void |
setAuxInfo(java.lang.Object info) |
java.lang.String |
toString() |
void |
writeToStream(java.io.OutputStream outputStream)
Write the MFile to an OutputStream
|
void |
writeToStream(java.io.OutputStream outputStream,
long offset,
long maxBytes)
Write the MFile to an OutputStream
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisReadable, isZipFilepublic final java.io.File directory
public final java.lang.String name
public final long lastModified
public final long length
public final int index
public long getLastModified()
MFilegetLastModified in interface MFilepublic long getLength()
MFilepublic boolean isDirectory()
isDirectory in interface MFilepublic java.lang.String getPath()
MFilepublic java.lang.String getName()
MFilepublic int compareTo(MFile o)
@Nullable public java.lang.Object getAuxInfo()
getAuxInfo in interface MFilepublic void setAuxInfo(java.lang.Object info)
setAuxInfo in interface MFilepublic java.io.File getDirectory()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean exists()
MFilepublic java.io.FileInputStream getInputStream()
throws java.io.FileNotFoundException
MFilegetInputStream in interface MFilejava.io.FileNotFoundExceptionpublic void writeToStream(java.io.OutputStream outputStream)
throws java.io.IOException
MFilewriteToStream in interface MFileoutputStream - the OutputStream the MFile contents should be written tojava.io.IOExceptionpublic void writeToStream(java.io.OutputStream outputStream,
long offset,
long maxBytes)
throws java.io.IOException
MFilewriteToStream in interface MFileoutputStream - the OutputStream the MFile contents should be written tooffset - the index of the first byte to write outmaxBytes - the maximum number of bytes to copyjava.io.IOExceptionpublic GcMFile getChild(java.lang.String newFilename)
MFilepublic java.lang.String relativize(MFile other)
MFilerelativize in interface MFileother - the MFile to relativize against this MFile's path