Next: , Up: Directories and File Names   [Index]


7.2.1 File Name Components

The operating system groups files into directories. To specify exactly and precisely (absolutely) a file4, you must specify the directory and the file’s file name within that directory.

Therefore, Emacs considers a file name5 as having two main parts:

Either part may be empty. Concatenating these two parts reproduces the original file name6. On most systems, the directory part is everything up to and including the last slash; the nondirectory part is the rest.

Absolute File Names

An absolute file name specifies all the directory names starting from the root of the tree. An absolute file name starts with a ‘/’.

Relative File Names

A relative file name specifies the position of the file in the tree relative to a default directory. A relative file name does NOT start with a ‘/’. It can use abbreviations such as ‘.’, ‘..’, and ‘~’.

Expanding File Names

Expanding a file name means converting a relative file name to an absolute one. Since this is done relative to a default directory, you must specify the default directory as well as the file name to be expanded. It also involves expanding abbreviations (e.g., ‘~’).

Quoting File Name

Sometimes, it is not desired to expand file names. In such cases, the file name can be quoted to suppress the expansion, and to handle the file name literally. Quoting happens by prefixing the file name with ‘/:’.


Footnotes

(4)

some would call this a path

(5)

path

(6)

path


Next: Directory Names and Directory File Names, Up: Directories and File Names   [Index]