file-name-directory

file-name-directory is a built-in function in `C source code'.

(file-name-directory FILENAME)

Return the directory component in file name FILENAME.
Return nil if FILENAME does not include a directory.
Otherwise return a directory name.
Given a Unix syntax file name, returns a string ending in slash.