expand-file-name is a function defined in C source code.
Signature
(expand-file-name NAME &optional DEFAULT-DIRECTORY)
Documentation
Convert filename NAME to absolute, and canonicalize it.
Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
(does not start with slash or tilde); both the directory name and
a directory's file name are accepted. If DEFAULT-DIRECTORY is nil or
missing, the current buffer's value of default-directory is used.
NAME should be a string that is a valid file name for the underlying
filesystem.
File name components that are . are removed, and so are file name
components followed by .., along with the .. itself; note that
these simplifications are done without checking the resulting file
names in the file system.
Multiple consecutive slashes are collapsed into a single slash, except
at the beginning of the file name when they are significant (e.g., UNC
file names on MS-Windows.)
An initial "~" in NAME expands to your home directory.
An initial "~USER" in NAME expands to USER's home directory. If
USER doesn't exist, "~USER" is not expanded.
To do other file name substitutions, see substitute-in-file-name.
For technical reasons, this function can return correct but
non-intuitive results for the root directory; for instance,
(expand-file-name ".." "/") returns "/..". For this reason, use
(directory-file-name (file-name-directory dirname)) to traverse a
filesystem tree, not (expand-file-name ".." dirname). Note: make
sure DIRNAME in this example doesn't end in a slash, unless it's
the root directory.
View in manual
References
C code is not yet loaded.
Find all references
Debugging
Enable tracing
Source Code
Set C source directory