PATH:HAS_*¶
- $<PATH:HAS_*,path>¶
This generator expression belongs to the Path Queries family. See that section for related generator expressions.
Syntax¶
$<PATH:HAS_*,path>
Added in version 3.24.
The following operations return 1 if the particular path component is
present, 0 otherwise. See Path Structure And Terminology for the
meaning of each path component.
$<PATH:HAS_ROOT_NAME,path>
$<PATH:HAS_ROOT_DIRECTORY,path>
$<PATH:HAS_ROOT_PATH,path>
$<PATH:HAS_FILENAME,path>
$<PATH:HAS_EXTENSION,path>
$<PATH:HAS_STEM,path>
$<PATH:HAS_RELATIVE_PART,path>
$<PATH:HAS_PARENT_PATH,path>
Note the following special cases:
For
HAS_ROOT_PATH, a true result will only be returned if at least one ofroot-nameorroot-directoryis non-empty.For
HAS_PARENT_PATH, the root directory is also considered to have a parent, which will be itself. The result is true except if the path consists of just a filename.