directory separator is found.
Example:
assert(filenameName("/usr/lib") == "lib");
assert(filenameName("/usr/") == "");
assert(filenameName("file.txt") == "file.txt");string filenameName(string path) @trustedGets the filename portion of a path.
Returns the part of the path after the last directory separator. If no separator is found, returns the entire path.
path | Full path to extract filename from |
directory separator is found.
Example:
assert(filenameName("/usr/lib") == "lib");
assert(filenameName("/usr/") == "");
assert(filenameName("file.txt") == "file.txt");