|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnachos.kernel.filesys.FileSystem
nachos.kernel.filesys.FileSystemStub
class FileSystemStub
This "filesystem stub" class implements a Nachos filesystem by simply passing the filesystem operations through to the native filesystem on the host platform. This is provided in case the multiprogramming and virtual memory assignments (which make use of the file system) are done before the file system assignment.
Field Summary | |
---|---|
private static boolean |
BLOCKING_FILESYS
Do filesystem operations cause the calling thread to block waiting for the operation to complete? Blocking is simulated by calling Scheduler.yield; more realistically, the thread would wait for an interrupt to inform it that the operation is complete. |
Constructor Summary | |
---|---|
protected |
FileSystemStub()
Constructor is protected so that all creations are funneled through the init() factory method of the super class. |
Method Summary | |
---|---|
boolean |
create(java.lang.String name,
long initialSize)
Create a new file with a specified name and size. |
OpenFile |
open(java.lang.String name)
Open the file with the specified name and return an OpenFile object that provides access to the file contents. |
boolean |
remove(java.lang.String name)
Remove the file with the specified name. |
Methods inherited from class nachos.kernel.filesys.FileSystem |
---|
init, list, print |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final boolean BLOCKING_FILESYS
Constructor Detail |
---|
protected FileSystemStub()
Method Detail |
---|
public boolean create(java.lang.String name, long initialSize)
create
in class FileSystem
name
- The name of the file.initialSize
- The size of the file.
public OpenFile open(java.lang.String name)
open
in class FileSystem
name
- The name of the file.
public boolean remove(java.lang.String name)
remove
in class FileSystem
name
- The name of the file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |