Note that the string returned by file-name-from-path may actually be the name of a directory, if the path denotes a directory.
If the last part of the path denotes a relative directory or the current directory (e.g. ".." or ".") then #f will be returned. Use simplify-path to ensure a file name does exist.
file-name-from-path uses the built-in split-path to split a path into constituents.