Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
A
allBits
- Variable in class
BaseFileSystem
allBits is a bit set of all valid file numbers.
B
BaseFileSystem
- class
BaseFileSystem
.
A BaseFileSystem represents a low-level file system in which files are referenced by file number.
BaseFileSystem()
- Constructor for class
BaseFileSystem
This constructor is disabled.
BaseFileSystem(String, int)
- Constructor for class
BaseFileSystem
new BaseFileSystem(nm, cap) returns a new base file system with a capacity of cap files.
base
- Variable in class
HierarchicalFileSystem
base is the base file system wrapped by this hierarchical file system.
C
capacity
- Variable in class
BaseFileSystem
capacity is the number of files in this base file system.
cat(String)
- Static method in class
TestHFS
cat(nm) changes the current working directory to nm.
cd()
- Static method in class
TestHFS
cd() changes the current working directory to "/".
cd(String)
- Static method in class
TestHFS
cd(dir) changes the current working directory to dir.
checkTestPath(String)
- Method in class
HierarchicalFileSystem
checkTestPath(pth) prints pth and its tail and last directory.
create(File)
- Method in class
BaseFileSystem
fs.create(f) returns the file number assigned to a new file f.
create(String)
- Method in class
HierarchicalFileSystem
fs.create(pth) creates a regular file with absolute path pth in fs.
createDir(String)
- Method in class
HierarchicalFileSystem
fs.createDir(pth) creates a new directory with absolute path pth in fs.
cwd
- Static variable in class
TestHFS
cwd is the current working directory without a trailing slash.
D
Directory
- class
Directory
.
A Directory represents an operating system structure that is used to access the contents of a directory.
Directory()
- Constructor for class
Directory
new Directory() returns a new empty directory.
delete(int)
- Method in class
BaseFileSystem
fs.delete(fn) removes the file with file number fn from fs and returns fn.
delete(String)
- Method in class
HierarchicalFileSystem
fs.delete(pth) removes the regular file with absolute path pth from fs.
deleteDir(String)
- Method in class
HierarchicalFileSystem
fs.deleteDir(pth) removes the directory with absolute path pth from fs.
E
entries
- Variable in class
Directory
entries is the table of directory entries for this directory.
entries()
- Method in class
Directory
d.entries() returns an iterator for the directory entries in d, excluding the entries for "." and "..".
F
File
- class
File
.
A File represents an operating system structure that is used to access the contents of a file.
File()
- Constructor for class
File
new File() returns a new file.
fileNumber
- Variable in class
File
fileNumber is the file number for this file.
fileNumber(Integer)
- Static method in class
File
File.fileNumber(fn) returns an int file number for the Integer fn.
fileSet()
- Method in class
BaseFileSystem
fs.fileSet() returns a string describing the set of files in fs.
files
- Variable in class
BaseFileSystem
files is the list of file accessors for this base file system.
files()
- Method in class
BaseFileSystem
fs.files() returns an iterator for the files in fs.
freeBits
- Variable in class
BaseFileSystem
freeBits is a bit set of the file numbers that are not in use.
G
getCapacity()
- Method in class
BaseFileSystem
fs.getCapacity() returns the maximum number of files for fs.
getCapacity()
- Method in class
HierarchicalFileSystem
fs.getCapacity() returns the maximum number of files for fs.
getFileNumber(String)
- Method in class
Directory
d.getFileNumber(nm) returns the file number in d whose simple name is nm, or File.NULL if there is no such file.
getFileNumber()
- Method in class
File
f.getFileNumber() returns the file number of f.
getLastDir(String)
- Method in class
HierarchicalFileSystem
getLastDir(pth) returns the directory before the tail of pth or null if there is no such directory.
getName()
- Method in class
BaseFileSystem
fs.getName() returns the file system name of fs as a string.
getTail(String)
- Method in class
HierarchicalFileSystem
getTail(pth) returns the name at the tail of pth.
H
HierarchicalFileSystem
- class
HierarchicalFileSystem
.
A HierarchicalFileSystem represents a hierarchical file system in which files are referenced by UNIX style path names.
HierarchicalFileSystem(BaseFileSystem)
- Constructor for class
HierarchicalFileSystem
new HierarchicalFileSystem(bfs) returns a new hierarchical file system wrapper for the base file system bfs.
hfs
- Static variable in class
TestHFS
hfs is the test hierarchical file system.
I
initForTest()
- Method in class
HierarchicalFileSystem
initForTest() manually creates directories and files for testing purposes.
isDirectory()
- Method in class
Directory
d.isDirectory() returns true if f is a directory.
isDirectory()
- Method in class
File
f.isDirectory() returns true if f is a directory.
isSimpleName(String)
- Static method in class
Directory
Directory.isSimpleName(nm) returns true if nm is a valid simple file name.
L
link(String, int)
- Method in class
Directory
d.link(nm, fn) links fn into d with simple name nm and returns the file number that was previously linked with name nm.
ls()
- Static method in class
TestHFS
ls() prints the contents of the current working directory.
M
main(String[])
- Static method in class
BaseFileSystem
main(args) is a test program for the BaseFileSystem class.
main(String[])
- Static method in class
Directory
main(args) is a program to test the Directory class.
main(String[])
- Static method in class
HierarchicalFileSystem
main(args) is a program for testing the private methods of the HierarchicalFileSystem class.
main(String[])
- Static method in class
TestHFS
main(args) is a program for testing the public methods of the HierarchicalFileSystem class.
mk(String)
- Static method in class
TestHFS
mk(nm) creates a new file named nm in the current working directory.
mkdir(String)
- Static method in class
TestHFS
mkdir(nm) creates a new subdirectory named nm in the current working directory.
N
NO_FILE
- Static variable in class
BaseFileSystem
BaseFileSystem.NO_FILE is the file number for nonexistent files.
NULL
- Static variable in class
File
File.NULL is the file number for nonexistent files.
name
- Variable in class
BaseFileSystem
name is the name of this base file system.
O
open(int)
- Method in class
BaseFileSystem
fs.open(fn) returns an accessor for the file with file number fn, or null if there is no such file.
open(String)
- Method in class
HierarchicalFileSystem
fs.open(pth) returns a file access structure for the file with absolute path pth.
openDir(String)
- Method in class
HierarchicalFileSystem
fs.openDir(pth) returns a directory access structure for the directory with absolute path pth.
P
Panic
- error
Panic
.
A Panic represents an error detected in the operating system code.
Panic()
- Constructor for class
Panic
new Panic() returns a new operating system code error with an empty message string.
Panic(String)
- Constructor for class
Panic
new Panic(msg) returns a new operating system code error with message string msg.
path(String)
- Static method in class
TestHFS
path(nm) returns the absolute path for nm.
pwd()
- Static method in class
TestHFS
pwd() prints the current working directory.
R
rm(String)
- Static method in class
TestHFS
rm(nm) removes the file named nm from the current working directory.
rmdir(String)
- Static method in class
TestHFS
rmdir(nm) removes the subdirectory named nm from the current working directory.
root
- Variable in class
HierarchicalFileSystem
root is the file number of the root directory of this hierarchical file system.
S
SEPARATOR
- Static variable in class
Directory
Directory.SEPARATOR is the direcory separator character in file paths.
setFileNumber(int)
- Method in class
File
f.setFileNumber(fn) sets the file number of f to fn.
size()
- Method in class
Directory
d.size() returns the number of directory entries in d, excluding the entries for "." and "..".
T
TestHFS
- class
TestHFS
.
The TestHFS class provides a main method for testing the public methods of the HierarchicalFileSystem class.
TestHFS(BaseFileSystem)
- Constructor for class
TestHFS
This constructor is disabled.
toString()
- Method in class
BaseFileSystem
fs.toString() returns the class name and file system name of fs as a string.
toString()
- Method in class
File
f.toString() returns the class name and file number of f as a string.
toString()
- Method in class
HierarchicalFileSystem
fs.toString() returns the class name and file system name of fs as a string.
U
unlink(String)
- Method in class
Directory
d.unlink(nm) unlinks the file whose simple name is nm from d and returns the file.
A
B
C
D
E
F
G
H
I
L
M
N
O
P
R
S
T
U
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes