User's manual. Section 3.

DIR(3): directory entries


DESCRIPTION

Files are described by directory entries. Each directory entry is a self-describing entity made of attribute/value pairs. Most tools in the system operate by first finding a stream of directory entries provided a set of names as described in names(3) and then performing some operation(s) on them.

By convention, there are a few attributes that can be expected to exist. All their values are strings. Those that imply a numeric value keep the value represented as a string. Those that imply a time value correspond to the UNIX nanosecond time.

Attributes name, type, mode, size, and mtime and those starting with an lowercase rune are expected to persist. All other attributes starting with uppercase are not expected to persist in the file system and are considered as temporary. The tools in the clive/cmd package decorate directory entries with Upath and Rpath, for example, to represent the path as given by the user and as relative from the path as given by the user.

Attributes path, addr, type, and name will not be changed by requests that update attributes. The size attribute for directories is also ignored during updates. Depening on permissions, mode, size, uid, gid and mtime can be changed; the same goes for other attributes added by the user.

Empty attribute names can be used to remove a existing attribute, but it is an error to try to remove attributes that cannot be changed by the user. Although mode, mtime, size, Uid, and Gid can be changed by the user, they cannot be removed.

This is a list of some conventional attributes:

name
holds the (base) name of the file
path
holds the absolute path of the file as seen by the user in the name-space
addr
holds the address where to reach the resource.
mtime
holds the last modification time for the file
type
holds a d for directories, a - for files, and other values for other file types.
mode
holds 0777 or any other number represented in octal for the file permissions.
err
is present only in entries used to report errors on a file during a find request. Entries with this attribute should be considered as errors, not as actual entries.
uid
holds the user id (a string)
gid
holds the group id
wuid
holds the id of the user who last changed the file

SEE ALSO

BUG

  • The err attribute should be Err.


User's manual. Section 3.