Method Summary |
|
native public long | availableSize() Determines the free memory that is available on the file system the file
or directory resides on. |
native public boolean | canRead() Check is file corresponding to this filehandler exists and has a
read permission. |
native public boolean | canWrite() Check is file corresponding to this filehandler exists and has a
write permission. |
native public void | close() Close file associated with this handler. |
native public void | closeForRead() Closes the file for reading. |
native public void | closeForReadWrite() Closes the file for both reading and writing. |
native public void | closeForWrite() Closes the file for writing. |
public void | connect(String rootName, String fileName) Connect file handler to the abstract file target. |
native public void | create() Create file corresponding to this file handler. |
public void | createPrivateDir(String rootName) Creates dedicated private working directory for the MIDlet suite. |
native public void | delete() Deletes the file or directory associated with this handler.
The file or directory is deleted immediately on
the actual file system upon invocation of this method. |
native public long | directorySize(boolean includeSubDirs) Determines the size in bytes on a file system of all of the files
that are contained in a directory.
Parameters: includeSubDirs - if true , size calculation willinclude all subdirectories' size. |
native public boolean | exists() Check is file or directory corresponding to this filehandler exists. |
native public long | fileSize() Determines the size of a file on the file system. |
native public void | flush() Flushes any output to the file. |
native public static char | getFileSeparator() Gets the system-dependent file separator character. |
public String | illegalFileNameChars() Returns a string that contains all characters forbidden for the use on
the given platform except "/" (forward slash) which is always considered
illegal. |
native public boolean | isDirectory() Check is file corresponding to this filehandler exists and is a
directory. |
public boolean | isHidden() Check is file corresponding to this filehandler exists and is
hidden. |
native public long | lastModified() Returns the time that the file denoted by this file handler
was last modified. |
public Vector | list(String filter, boolean includeHidden) Gets a filtered list of files and directories contained in a directory.
The directory is the handler's target as specified in
create() .
Parameters: filter - String against which all files and directories arematched for retrieval. |
public Vector | listRoots() List filesystem roots available on the device. |
native public void | mkdir() Creates a directory corresponding to the directory
string provided in the connect() method.
The directory is created immediately on the actual
file system upon invocation of this method. |
native public void | openForRead() Opens the file for reading. |
native public void | openForWrite() Opens the file for writing. |
native public void | positionForWrite(long offset) Sets the next write location. |
native public int | read(byte b, int off, int len) Reads data from the file to an array. |
public void | rename(String newName) Renames the selected file or directory to a new name in the same
directory. |
public void | setHidden(boolean hidden) Sets the hidden attribute of the file associated with this file handler
to the value provided. |
native public void | setReadable(boolean readable) Sets the file or directory readable attribute to the
indicated value. |
native public void | setWritable(boolean writable) Sets the file or directory associated with this file handler writable
attribute to the
indicated value. |
native public long | totalSize() Determines the total size of the file system the connection's target
resides on. |
native public void | truncate(long byteOffset) Truncates the file, discarding all data from the given byte offset to
the current end of the file. |
public long | usedSize() Determines the used memory of a file system the connection's target
resides on. |
native public int | write(byte b, int off, int len) Write data from an array to the file. |