Member predicate Make::Container::getBaseName
Gets the base name of this container including extension, that is, the last segment of its absolute path, or the empty string if it has no segments.
Here are some examples of absolute paths and the corresponding base names (surrounded with quotes to avoid ambiguity):
Absolute path | Base name |
---|---|
"/tmp/tst.txt" | "tst.txt" |
"C:/Program Files (x86)" | "Program Files (x86)" |
"/" | "" |
"C:/" | "" |
"D:/" | "" |
"//FileServer/" | "" |