CodeQL library for C/C++
codeql/cpp-all 2.1.1-dev (changelog, source)
Search

Member predicate File::getShortName

Gets the short name of this file, that is, the prefix of its base name up to (but not including) the first dot character if there is one, or the entire base name if there is not. For example, if the full name is “/path/to/filename.a.bcd” then the short name is “filename”.

Predicates getStem and getExtension should be preferred over getShortName and getExtensions since the former pair is compatible with the file libraries of other languages. Note the slight difference between this predicate and getStem: for example, for “file.tar.gz”, this predicate will have the result “file”, while getStem will have the result “file.tar”.

string getShortName()