A directory behaves like an ordinary file,
except that no user may write into a directory.
The fact that a file is a directory is indicated by
a field in its inode (see
The structure of a directory is given in the include file
corresponding to each supported filesystem:
DTFS (Desktop Filesystem, a compression filesystem)
HS (High Sierra), ISO9660 and
RCKRDG (Rock Ridge)
S51K (UNIX filesystem),
HTFS (High Throughput Filesystem),
EAFS (Enhanced ACER Fast Filesystem)
and AFS (ACER Fast Filesystem)
Due to the diversity of filesystem types (and hence directory
structures), do not read the directory as a
system calls should be used.
These are provided to allow directories to
be read in a way that is independent of filesystem structure.
By convention, the first two entries in each directory
are``dot'' (.) and ``dotdot'' (..).
The first is an entry for the directory itself.
The second is for the parent directory.
The meaning of dotdot is modified for the root directory
of the master file system;
there is no parent, so dotdot has the same meaning as dot.
When versioning is enabled under HTFS/DTFS
and a directory is being
read that has versioning enabled, the use of
may return entries for the versioned copies of files that have been
modified. These are only returned if the SHOWVERSIONS environment
variable has the value
The returned entries take the form
for more details.