CodeQL library for JavaScript/TypeScript
codeql/javascript-all 2.1.1-dev (changelog, source)
Search

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 pathBase name
"/tmp/tst.txt""tst.txt"
"C:/Program Files (x86)""Program Files (x86)"
"/"""
"C:/"""
"D:/"""
"//FileServer/"""
string getBaseName()