The path.iscppfile function returns true if the specified path represents a C++ source code file, based on its file extension.
path.iscppfile("path")
Parameters
path is the file system path to check.
Return Value
True if the path matches a well-known C++ file extension, false otherwise.



It also returns true for C, Objective-C (*.m), Objective-C++ (*.mm), and assembler (*.s)