Function |file_name
fs/path::|file_name
Usage
|file_name(path)
Parameters
↳ path:
string
Return
↴ Option<string>
Gives file name.
Return the full name of the file (bin
for /usr/bin/
, bar.txt
for foo/bar.txt
, etc
for etc/./
, empty for /
).
If the path is a normal file, this is the file name. If it's the path of a directory, this is the directory name.
Returns none if the path terminates in ..
.