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


7.2.3.4 file-name-extension

Function: file-name-extension filename &optional period
FILENAME

a file name

PERIOD

if non-nil, include the period in the returned value; if file name has no extension, return the empty string rather than nil.

RETURN VALUE

the FILENAME’s extension, i.e., the part that begins with the last ‘.’, or nil for extensionless file name, or the empty string if the file name ends with a period.