|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.fs.DataFS
public final class DataFS
Preliminary collection of file system methods.
| Field Summary | |
|---|---|
int |
dirID
Index References. |
int |
fileID
Index References. |
static boolean |
FLUSH
Force flush after each update. |
static int |
ROOTDIR
Root dir. |
int |
suffID
Index References. |
int |
timeID
Index References. |
| Constructor Summary | |
|---|---|
DataFS(Data d)
Constructor. |
|
| Method Summary | |
|---|---|
int[] |
children(int pre)
Returns all directories and files of a directory. |
int[] |
children(int pre,
java.lang.String path)
Returns the pre values of files or dir. |
byte[] |
currTime()
Returns the current time in the FS format. |
int |
dir(int pre,
java.lang.String path)
Returns the pre value of a dir. |
void |
flush()
Flushes the data. |
int |
goTo(int pre,
java.lang.String path)
Returns the pre value of the resulting directory. |
void |
insert(boolean isDir,
byte[] name,
byte[] suffix,
byte[] size,
byte[] mtime,
int parent,
int pre)
Inserts a new entry into the table. |
boolean |
isDir(int pre)
Checks if the specified node is a directory. |
boolean |
isFile(int pre)
Checks if the specified node is a file. |
void |
launch(int pre)
Opens the file which is defined by the specified pre value. |
byte[] |
name(int pre)
Returns the name of a file. |
byte[] |
path(int pre)
Returns the path of a file. |
byte[] |
path(int pre,
int par,
boolean abs)
Returns the relative path of a file. |
java.lang.String |
regex(java.lang.String expr)
Tests if wildcards are used. |
byte[] |
size(int pre)
Returns the size of a file. |
void |
size(int pre,
byte[] size)
Sets the size of a file. |
byte[] |
suffix(int pre)
Returns the suffix of a file. |
byte[] |
time(int pre)
Returns the Mtime of a file. |
void |
time(int pre,
byte[] mtime)
Sets the Mtime of a file. |
boolean |
valid(java.lang.String file)
Returns if the file/dir expression is valid. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean FLUSH
public static final int ROOTDIR
public int fileID
public int dirID
public int suffID
public int timeID
| Constructor Detail |
|---|
public DataFS(Data d)
d - data reference| Method Detail |
|---|
public boolean isFile(int pre)
pre - pre value
public boolean isDir(int pre)
pre - pre value
public byte[] path(int pre)
pre - pre value
public byte[] path(int pre,
int par,
boolean abs)
pre - pre value of current nodepar - pre value of last dir to printabs - absolute flag
public byte[] name(int pre)
pre - pre value
public byte[] size(int pre)
pre - pre value
public void size(int pre,
byte[] size)
pre - pre valuesize - to setpublic byte[] time(int pre)
pre - pre value
public void time(int pre,
byte[] mtime)
pre - pre valuemtime - to setpublic byte[] suffix(int pre)
pre - pre value
public byte[] currTime()
public int[] children(int pre)
pre - pre value of the "parent" directory
public int[] children(int pre,
java.lang.String path)
pre - pre value of the "parent" directorypath - directory name
public int dir(int pre,
java.lang.String path)
pre - pre value of the "parent" directorypath - path name
public int goTo(int pre,
java.lang.String path)
pre - pre valuepath - path expression
public java.lang.String regex(java.lang.String expr)
expr - the expression of the user
public boolean valid(java.lang.String file)
file - file/directory
public void insert(boolean isDir,
byte[] name,
byte[] suffix,
byte[] size,
byte[] mtime,
int parent,
int pre)
isDir - insert dir or filename - filenamesuffix - suffix of the filesize - size of the filemtime - make timeparent - pre value of the parentpre - position to insertpublic void launch(int pre)
pre - pre valuepublic void flush()
FLUSH flag is set to false,
flushing will be skipped at this stage.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||