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, wait
isReadable, isZipFile
public 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()
MFile
getLastModified
in interface MFile
public long getLength()
MFile
public boolean isDirectory()
isDirectory
in interface MFile
public java.lang.String getPath()
MFile
public java.lang.String getName()
MFile
public int compareTo(MFile o)
@Nullable public java.lang.Object getAuxInfo()
getAuxInfo
in interface MFile
public void setAuxInfo(java.lang.Object info)
setAuxInfo
in interface MFile
public java.io.File getDirectory()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean exists()
MFile
public java.io.FileInputStream getInputStream() throws java.io.FileNotFoundException
MFile
getInputStream
in interface MFile
java.io.FileNotFoundException
public void writeToStream(java.io.OutputStream outputStream) throws java.io.IOException
MFile
writeToStream
in interface MFile
outputStream
- the OutputStream the MFile contents should be written tojava.io.IOException
public void writeToStream(java.io.OutputStream outputStream, long offset, long maxBytes) throws java.io.IOException
MFile
writeToStream
in interface MFile
outputStream
- 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.IOException
public GcMFile getChild(java.lang.String newFilename)
MFile
public java.lang.String relativize(MFile other)
MFile
relativize
in interface MFile
other
- the MFile to relativize against this MFile's path