Next: File Name Expansion, Previous: Directory Names, Up: File Names [Contents][Index]
All the directories in the file system form a tree starting at the root directory. A file name can specify all the directory names starting from the root of the tree; then it is called an absolute file name. Or it can specify the position of the file in the tree relative to a default directory; then it is called a relative file name. On Unix, an absolute file name starts with a slash or a tilde (‘~’), and a relative one does not.
This function returns t
if file filename is an absolute
file name, nil
otherwise.
(file-name-absolute-p "~rms/foo") ⇒ t
(file-name-absolute-p "rms/foo") ⇒ nil
(file-name-absolute-p "/user/rms/foo") ⇒ t