|
kAWT Version 0.95 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.File
An abstract representation of file and directory pathnames based on
com.sun.kjava.Database.
The kAWT FileDB Format:
The IO extension of kAWT contains a hierarchical file system
simulation based on a regular Palm memory database. Storing clusters
on a Palm is done inside a database called "TrantorFileDB" with
creatorID/typeID = KAWT/FILE
Record Structure:
The first record (#0) in the FileDB contains the cluster table of the
root directory. The second record contains a list of unused records.
Files:
Files consist of a cluster table and one or more data records. The
data records have a fixed size of 512 bytes.
Cluster Tables:
The first four bytes of the cluster table contain the current file
length in Motorola format. The file length is followed by (filesize /
512) two-byte entries. These entries are pointers to the 512-byte
records containing the actual file data.
Directories:
Directories are organized like simple files. The directory file
contains a list of filenames and cluster table record pointers. The
directory entires start with a letter (D/F), denoting the type of the
entry. If the letter is a "D", the entry points to a directory. If the
letter is a "F", the entry points to a simple file. The type letter is
followed by a space and the local name of the file. The file name is
followed by a space. The space is followed by the record number of the
cluster table of the file. The record number is encoded in decimal
format. The entry is terminated by a newline character (#10, 0x0A).
Field Summary | |
static String |
separator
The system-dependent default name-separator character, represented as a string for convenience. |
static char |
separatorChar
The system-dependent default name-separator character. |
Constructor Summary | |
File(File parent,
String child)
Creates a new File instance from a parent abstract pathname and a child pathname string. |
|
File(String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname. |
|
File(String parent,
String child)
Creates a new File instance from a parent pathname string and a child pathname string. |
Method Summary | |
boolean |
delete()
Deletes the file or directory denoted by this abstract pathname. |
String |
getCanonicalPath()
Returns the canonical pathname string of this abstract pathname. |
String |
getName()
Returns the name of the file or directory denoted by this abstract pathname. |
boolean |
isDirectory()
Tests whether the file denoted by this abstract pathname is a directory. |
long |
length()
Returns the length of the file denoted by this abstract pathname. |
String[] |
list()
Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname. |
File[] |
listFiles()
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname. |
boolean |
mkdir()
Creates the directory named by this abstract pathname. |
String |
toString()
Returns the pathname string of this abstract pathname. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static String separator
public static char separatorChar
Constructor Detail |
public File(File parent, String child)
parent
- - The parent abstract pathnamechild
- - The child pathname stringpublic File(String parent, String child)
parent
- - The parent pathname stringchild
- - The child pathname stringpublic File(String pathname)
pathname
- - A pathname stringMethod Detail |
public boolean delete()
public String getCanonicalPath() throws IOException
public String getName()
public boolean isDirectory()
public String[] list()
public long length()
public File[] listFiles()
public boolean mkdir()
public String toString()
|
kAWT Version 0.95 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |