|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmoss.fs.MDevFS
public class MDevFS
this class implements the "device" file-system. This provides a way of accessing devices through the file-system.
| Constructor Summary | |
|---|---|
MDevFS()
|
|
| Method Summary | |
|---|---|
int |
access(java.lang.String path,
int amode)
tests for access to a file |
static void |
finalinit()
called to perform final kernel initialisation (in the context of the init-task) |
int |
link(java.lang.String oldpath,
java.lang.String newpath)
creates a `hard-link' |
int |
mkdir(java.lang.String path,
int flags)
creates a directory in the file-system |
int |
mknod(java.lang.String path,
int mode,
int majmin)
creates a special file on the file-system |
int |
mount(java.lang.String mount_path,
java.lang.String[] options)
called when the device file-system is mounted. |
int |
open(java.lang.String path,
MFile handle,
int flags,
int mode)
called to open a file. |
int |
opendir(java.lang.String path,
MFile handle)
called to open a directory (read-only!). |
int |
readlink(java.lang.String path,
byte[] buf,
int buflen)
reads the contents of a symbolic-link on the file-system |
static int |
register_devdir(java.lang.String name)
creates a directory in the device file-system |
static MInode |
register_device(java.lang.String name,
int major,
int minor,
int mode)
registers a device with the device file-system |
int |
rmdir(java.lang.String path)
removes a directory from the file-system (must be empty) |
int |
stat(java.lang.String path,
MInode statbuf)
retrieves information about a name on the file-system |
int |
symlink(java.lang.String oldpath,
java.lang.String newpath)
creates a symbolic link |
int |
umount(java.lang.String[] options)
this is called before the device file-system is un-mounted. |
int |
unlink(java.lang.String path)
removes a name from the file-system |
static int |
unregister_devdir(java.lang.String name)
removes a directory in the device file-system |
static int |
unregister_device(java.lang.String name)
unregisters something from the device file-system |
int |
utime(java.lang.String path,
long[] times)
sets access and modification times for a file (inode) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MDevFS()
| Method Detail |
|---|
public static void finalinit()
public static MInode register_device(java.lang.String name,
int major,
int minor,
int mode)
name - entry-name. may be something like "foo/bar", but the "foo" must exist firstmajor - major device numberminor - minor device numbermode - mode of the device
public static int unregister_device(java.lang.String name)
name - entry-name. may be something like "foo/bar"
public static int register_devdir(java.lang.String name)
name - name of the directory to create
public static int unregister_devdir(java.lang.String name)
name - name of the directory to remove
public int mount(java.lang.String mount_path,
java.lang.String[] options)
mount in interface MFSOpsmount_path - full path from the root (/) to where this is being mounted. A single
"/" indicates that this is being mounted as the root file-system.options - file-system specific options
public int umount(java.lang.String[] options)
umount in interface MFSOpsoptions - file-system specific un-mounting options
public int open(java.lang.String path,
MFile handle,
int flags,
int mode)
open in interface MFSOpspath - relative path to the file (e.g. `etc/passwd' for the root file-system)handle - file-handle to be associated with this fileflags - open flagsmode - file mode if creating
public int opendir(java.lang.String path,
MFile handle)
opendir in interface MFSOpspath - relative path to the directory (e.g. `etc/init.d' for the root file-system)handle - file-handle to be associated with this directory
public int mkdir(java.lang.String path,
int flags)
mkdir in interface MFSOpspath - relative path to the directory to be createdflags - flags (mode)
public int unlink(java.lang.String path)
unlink in interface MFSOpspath - relative path to the name to be removed
public int rmdir(java.lang.String path)
rmdir in interface MFSOpspath - relative path to the directory to be removed
public int link(java.lang.String oldpath,
java.lang.String newpath)
link in interface MFSOpsoldpath - existing relative path (e.g. local/packages/nmh for "usr" file-system)newpath - new relative path
public int symlink(java.lang.String oldpath,
java.lang.String newpath)
symlink in interface MFSOpsoldpath - full path to existing name (e.g. /usr/local/packages/nmh-1.4 for "usr" file-system)newpath - relative path to new link (e.g. local/packages/nmh for "usr" file-system)
public int mknod(java.lang.String path,
int mode,
int majmin)
mknod in interface MFSOpspath - relative path to file to createmode - file mode flagsmajmin - major and minor numbers `((major << 16) | minor)' for block/char special files,
otherwise ignored.
public int readlink(java.lang.String path,
byte[] buf,
int buflen)
readlink in interface MFSOpspath - relative path to symbolic link on file-systembuf - buffer where the link data is storedbuflen - maximum number of bytes to write into `buf'
public int utime(java.lang.String path,
long[] times)
utime in interface MFSOpspath - relative path to nametimes - array of two `long's that are the access and modification times respectively
public int stat(java.lang.String path,
MInode statbuf)
stat in interface MFSOpspath - relative path to namestatbuf - buffer in which information is placed
public int access(java.lang.String path,
int amode)
access in interface MFSOpspath - relative path to file/directoryamode - access mode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||