Next: , Previous: , Up: Directory and File Variables and Functions   [Index]


7.2.3.8 file-name-as-directory

This operation exists because a directory is also a file, but its name as a directory is different from its name as a file. The result can be used as the value of default-directory or passed as second argument to expand-file-name.

Function: file-name-as-directory file
FILE

a file

RETURN VALUE

Return a string representing the file name FILE interpreted as a directory. For a Unix-syntax file name, just appends a slash unless a trailing slash is already present.