DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Directory and file management

Path names

The name of a file may take the form of a ``pathname'', which is a sequence of directory names separated from one another by ``/'' and ending in a filename. A pathname is a null-terminated character-string starting with an optional slash, ``/'', followed by zero or more directory-names separated by slashes and optionally followed by a filename.

More precisely, a pathname is a null-terminated character-string as follows:

   <path_name>::=<file_name>|<path_prefix><file_name>|/|``.''|``..''
   <path_prefix>::=<rtprefix>|/<rtprefix>|empty
   <rtprefix>::=<dirname>/|<rtprefix><dirname>/
where <file_name> is a string of 1 or more significant characters (other than slash and null), and <dirname> is a string of 1 or more significant characters (other than slash and null) that names a directory. The result of names not produced by the grammar are undefined. A null string is undefined and may be considered an error. As a limiting case, the pathname ``/'' refers to the root-directory itself. An attempt to create or delete the pathname slash by itself is undefined and may be considered an error. The meanings of ``.'' and ``..'' are defined in ``Directory files''.

The sequence of directories preceding the filename is called a path-prefix, and if the path-prefix begins with a slash, the search begins in the root-directory. This is called a full pathname.


Next topic: Full pathnames
Previous topic: File naming

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005