moss.fs
Interface MDirOps


public interface MDirOps

This interface defines kernel "directory-operations". Its use is somewhat limited to actual directory handling (unlike MFileOps).


Method Summary
 int close(MFile handle)
          used to close a directory.
 int open(MFile handle)
          used to open a directory.
 int readdir(MFile handle, MDirEnt dirent)
          used to read a directory entry.
 

Method Detail

open

int open(MFile handle)
used to open a directory. This is only ever called once for each file (directory) handle

Parameters:
handle - file-handle of directory being opened
Returns:
0 on success or < 0 indicating error

close

int close(MFile handle)
used to close a directory. This is only ever called once for each file (directory) handle

Parameters:
handle - file-handle of the directory being closed
Returns:
0 on success or < 0 indicating error

readdir

int readdir(MFile handle,
            MDirEnt dirent)
used to read a directory entry.

Parameters:
handle - file-handle of the directory to read from
dirent - MDirEnt in which the directory entry is stored
Returns:
0 on success or < 0 indicating error (including end-of-directory)