DIR(3): directory entries
DESCRIPTIONFiles 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.
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
Rpath, for example, to represent the path as
given by the user and as relative from the path as given by the user.
name will not be changed by requests that
update attributes. The
size attribute for
directories is also ignored during updates. Depening on permissions,
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
Gid can be
changed by the user, they cannot be removed.
This is a list of some conventional attributes:
- holds the (base) name of the file
- holds the absolute path of the file as seen by the user in the name-space
- holds the address where to reach the resource.
- holds the last modification time for the file
dfor directories, a
-for files, and other values for other file types.
0777or any other number represented in octal for the file permissions.
- 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.
- holds the user id (a string)
- holds the group id
holds the id of the
user who last changed the file
errattribute should be