com.nutiteq.fs
Interface FileSystem

All Known Implementing Classes:
IDENFileSystem, JSR75FileSystem, MotoFileSystem

public interface FileSystem

Abstract class for support of various file system access implementations.


Method Summary
 java.util.Vector getRoots()
          Get file system roots.
 boolean isDirectory(java.lang.String filename)
          Check if a file is a directory
 java.util.Vector listFiles(java.lang.String path)
          List all files in a directory.
 FileSystemConnection openConnectionToFile(java.lang.String fileName)
           
 byte[] readFile(java.lang.String filename)
          Read file from disk/memory card/flash.
 

Method Detail

readFile

byte[] readFile(java.lang.String filename)
                throws java.io.IOException
Read file from disk/memory card/flash.

Parameters:
filename - fully-qualified file path (following "file:///" qualifier)
Returns:
file data
Throws:
java.io.IOException - if an exception occurs

openConnectionToFile

FileSystemConnection openConnectionToFile(java.lang.String fileName)
                                          throws java.io.IOException
Throws:
java.io.IOException

isDirectory

boolean isDirectory(java.lang.String filename)
                    throws java.io.IOException
Check if a file is a directory

Parameters:
filename - file to check
Returns:
true if it is a directory
Throws:
java.io.IOException

getRoots

java.util.Vector getRoots()
                          throws java.io.IOException
Get file system roots.

Returns:
an array including all the roots in the filesystem
Throws:
java.io.IOException

listFiles

java.util.Vector listFiles(java.lang.String path)
                           throws java.io.IOException
List all files in a directory.

Parameters:
path - path to list, null to list root
Returns:
a vector of file names
Throws:
java.io.IOException