Next: , Previous: , Up: Information about Files   [Contents][Index]


35.6.3 Truenames

The truename of a file is the name that you get by following symbolic links until none remain, then expanding to get rid of ‘.’ and ‘..’ as components. Strictly speaking, a file need not have a unique truename; the number of distinct truenames a file has is equal to the number of hard links to the file. However, truenames are useful because they eliminate symbolic links as a cause of name variation.

Function: file-truename filename &optional default

The function file-truename returns the true name of the file filename. This is the name that you get by following symbolic links until none remain.

If the filename is relative, default is the directory to start with. If default is nil or missing, the current buffer’s value of default-directory is used.

See Buffer File Name, for related information.