FsObj interface

FsObj is Plash's object-based interface for accessing file, directory and symlink objects.

Implementations

Methods

Methods common to files, directories and symlinks:

Methods for files:

Methods for directories:

Methods for symlinks:

Discussion

This interface does not provide any equivalent to the ".." path element. There is no way to get an object's parent directory. This is an essential property for an interface that follows CapabilityDiscipline. Plash implements the ".." path element in another layer on top of this interface; see DirStacks.

dir_traverse() only traverses one level down the directory hierarchy. This is not very efficient for interprocess or distributed use; resolving a pathname will involve multiple RPCs. We may need to add another method for traversing multiple levels.

Possible future changes

The dir_link() method has an odd interface: it is invoked on the source directory, taking the destination directory as an argument. A more conventional interface would be to invoke dir_link() on the destination directory, passing the object to link, with no directory argument:

"get_child" might be a better method name than "traverse".

FsObj (last edited 2007-03-17 22:34:26 by MarkSeaborn)