|
kAWT Version 0.81 | ||||||||
| 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 java.lang.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,
java.lang.String child)
Creates a new File instance from a parent abstract pathname and a child pathname string. |
|
File(java.lang.String pathname)
Creates a new File instance by converting the given pathname string into an abstract pathname. |
|
File(java.lang.String parent,
java.lang.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. |
java.lang.String |
getCanonicalPath()
Returns the canonical pathname string of this abstract pathname. |
java.lang.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. |
java.lang.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. |
java.lang.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 java.lang.String separator
public static char separatorChar
| Constructor Detail |
public File(File parent,
java.lang.String child)
parent - - The parent abstract pathnamechild - - The child pathname string
public File(java.lang.String parent,
java.lang.String child)
parent - - The parent pathname stringchild - - The child pathname stringpublic File(java.lang.String pathname)
pathname - - A pathname string| Method Detail |
public boolean delete()
public java.lang.String getCanonicalPath()
throws IOException
IOException - If an I/O error occurs, which is
possible because the construction of the canonical pathname may
require filesystem queriespublic java.lang.String getName()
public boolean isDirectory()
public java.lang.String[] list()
public long length()
public File[] listFiles()
public boolean mkdir()
public java.lang.String toString()
toString in class java.lang.Object
|
kAWT Version 0.81 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||