If file_name ends with a directory separator it gets the component
before the last slash. If file_name consists only of directory
separators (and on Windows, possibly a drive letter), a single
separator is returned. If file_name is empty, it gets ".".
Parameters
file_name: string
the name of the file
Returns string
a newly allocated string containing the last component of the filename
Gets the last component of the filename.
If
file_nameends with a directory separator it gets the component before the last slash. Iffile_nameconsists only of directory separators (and on Windows, possibly a drive letter), a single separator is returned. Iffile_nameis empty, it gets ".".