A file name is a string identifying an individual file (or directory) in the filing system (i.e. the disk). The exact syntax of file names depends on the operating system.
(file-name-directory "/tmp/foo")
=> "/tmp/"
(file-name-directory "foo")
=> ""
(file-name-directory "foo/bar/")
=> "/foo/bar/"
(file-name-nondirectory "/tmp/foo")
=> "foo"
(file-name-nondirectory "foo")
=> "foo"
(file-name-nondirectory "foo/bar/")
=> ""
(file-name-concat "/tmp" "foo" "bar")
=> "/tmp/foo/bar"
(file-name-concat "/tmp/" "foo/" "bar")
=> "/tmp/foo/bar"
(file-name-concat "/tmp/foo" "bar")
=> "/tmp/foo/bar"
When the optional argument make-absolute is non-nil file-name
is altered so that it is not relative to the current working directory.
Generally this involves prefixing it by the absolute name of the current
directory.
(expand-file-name "~/src")
=> "/home/jsh/src"
(expand-file-name "foo.c" t)
=> "/var/src/jade/foo.c"
(tmp-file-name)
=> "/tmp/00088aaa"
(tmp-file-name)
=> "/tmp/00088baa"
Go to the first, previous, next, last section, table of contents.