com.sentilla.system
Class FileDriver

java.lang.Object
  extended by com.sentilla.system.DriverAdapter
      extended by com.sentilla.system.FileDriver
All Implemented Interfaces:
Driver
Direct Known Subclasses:
FlashFileDriver

public abstract class FileDriver
extends DriverAdapter

Provides open, create, and remove operations for files. The file system uses integers for filenames and returns RandomAccessFile interfaces for data access. "file" is used as the default driver name.


Field Summary
 
Fields inherited from class com.sentilla.system.DriverAdapter
m_nextDriver
 
Constructor Summary
FileDriver()
           
 
Method Summary
static com.sentilla.io.RandomAccessFile create(int filename)
          Create a new file.
abstract  com.sentilla.io.RandomAccessFile createFile(int filename)
          Create a new file.
static com.sentilla.io.RandomAccessFile open(int filename)
          Open an existing file.
abstract  com.sentilla.io.RandomAccessFile openFile(int filename)
          Open an existing file.
static void remove(int filename)
          Remove a file.
abstract  void removeFile(int filename)
          Remove a file.
 
Methods inherited from class com.sentilla.system.DriverAdapter
getDriverName, getNextDriver, setNextDriver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDriver

public FileDriver()
Method Detail

openFile

public abstract com.sentilla.io.RandomAccessFile openFile(int filename)
Open an existing file.

Parameters:
filename - the 32-bit filename to open
Returns:
a new RandomAccessFile
Throws:
com.sentilla.io.IORuntimeException - if the file does not exist

createFile

public abstract com.sentilla.io.RandomAccessFile createFile(int filename)
Create a new file.

Parameters:
filename - the 32-bit filename to create
Returns:
a new RandomAccessFile
Throws:
com.sentilla.io.IORuntimeException - if the file cannot be created

removeFile

public abstract void removeFile(int filename)
Remove a file.

Parameters:
filename - the 32-bit filename to remove
Throws:
com.sentilla.io.IORuntimeException - if the file cannot be removed

open

public static com.sentilla.io.RandomAccessFile open(int filename)
Open an existing file.

The "file" system driver is used.

Parameters:
filename - the 32-bit filename to open
Returns:
a new RandomAccessFile
Throws:
com.sentilla.io.IORuntimeException - if the file does not exist

create

public static com.sentilla.io.RandomAccessFile create(int filename)
Create a new file.

The "file" system driver is used.

Parameters:
filename - the 32-bit filename to create
Returns:
a new RandomAccessFile
Throws:
com.sentilla.io.IORuntimeException - if the file cannot be created

remove

public static void remove(int filename)
Remove a file.

The "file" system driver is used.

Parameters:
filename - the 32-bit filename to remove
Throws:
com.sentilla.io.IORuntimeException - if the file cannot be removed


Copyright © 2007 Sentilla Corporation. All Rights Reserved.