public static class CMFile.CMVFSDir extends CMFile.CMVFSFile
Modifier and Type | Field | Description |
---|---|---|
static java.util.Comparator<CMFile.CMVFSFile> |
fcomparator |
|
protected CMFile.CMVFSFile[] |
files |
|
protected CMFile.CMVFSDir |
parent |
mask, path
Constructor | Description |
---|---|
CMVFSDir(CMFile.CMVFSDir parent,
int mask,
java.lang.String path) |
Creates a new directory
CMFile.VFS_MASK_DIRECTORY , CMFile.VFS_MASK_HIDDEN etc. |
CMVFSDir(CMFile.CMVFSDir parent,
java.lang.String path) |
Creates a new directory
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
add(CMFile.CMVFSFile f) |
Adds the given vfs file to this directory
|
boolean |
delete(CMFile.CMVFSFile file) |
Deletes the given VFS file from this directory.
|
CMFile.CMVFSFile |
fetch(java.lang.String filePath) |
Returns the vfs file at the given path starting here.
|
java.lang.String |
fetchBestTargetDir(java.lang.String dirPath) |
|
CMFile.CMVFSDir |
fetchSubDir(java.lang.String path,
boolean create) |
Returns a subdirectory of this directory at the given path, and
possibly creates it if not found.
|
protected CMFile.CMVFSFile[] |
getFiles() |
copyInto, getMaskBits, getPath, readData, saveData, setData
protected CMFile.CMVFSFile[] files
protected CMFile.CMVFSDir parent
public static java.util.Comparator<CMFile.CMVFSFile> fcomparator
public CMVFSDir(CMFile.CMVFSDir parent, java.lang.String path)
parent
- the directory containing this onepath
- the full path and name of this vfs filepublic CMVFSDir(CMFile.CMVFSDir parent, int mask, java.lang.String path)
CMFile.VFS_MASK_DIRECTORY
, CMFile.VFS_MASK_HIDDEN
etc.parent
- the directory containing this onemask
- bitmap of info about this directorypath
- the full path and name of this vfs fileprotected CMFile.CMVFSFile[] getFiles()
public CMFile.CMVFSDir fetchSubDir(java.lang.String path, boolean create)
path
- the path to look downcreate
- true to create if not found, false just to searchpublic final boolean add(CMFile.CMVFSFile f)
f
- the file to addpublic final boolean delete(CMFile.CMVFSFile file)
file
- the file to deletepublic final CMFile.CMVFSFile fetch(java.lang.String filePath)
filePath
- the path to get the file frompublic final java.lang.String fetchBestTargetDir(java.lang.String dirPath)