DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Customizing the Desktop with rules

Referring to file and directory names

When a file or directory is referred to in the Desktop, its name may be used in four ways:


absolute pathname
the full name of the file or directory, which always begins with a slash

basename
the name of the file/directory within its directory. It is the part of the absolute pathname following the last slash. In addition, the file or directory name's ``extension'' is the part of the basename from the last dot.

dirname
the name of the directory holding the file or directory. It is the part of the absolute pathname preceding the last slash.

relative pathname
the path to a file or directory, starting from your home directory

For example, the various names of the file /user/fred/work/letter.ed are:


absolute pathname
/user/fred/work/letter.ed

basename
letter.ed

extension
.ed

dirname
/user/fred/work

relative pathname
work/letter


NOTE: There is one special case: the dirname of ``/'' is /. (slash-dot), and its basename is / (slash).


Next topic: Canonical form
Previous topic: Processing filenames in rules

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003