PathProbe QML Type
Locates files outside the project. More...
Import Statement: | import |
Inherited By: |
Properties
- candidatePaths : stringList
- environmentPaths : stringList
- fileName : string
- filePath : string
- nameFilter : script
- nameSuffixes : stringList
- names : stringList
- path : string
- pathSuffixes : stringList
- platformEnvironmentPaths : stringList
- platformSearchPaths : pathList
- searchPaths : pathList
Detailed Description
Finds files that have the specified file name suffix, such as .exe, from the specified locations.
PathProbe takes as input lists of paths to search files from and file name patterns. The paths are specified by using the searchPaths, platformSearchPaths, environmentPaths, and platformEnvironmentPaths properties. The file name patterns are specified by the names and nameSuffixes properties. Returns the first file that matches the file name patterns. If no such file is found, the probe.found property is set to false
.
For example, a simple PathProbe that searches for the stdio.h header can be used as follows:
Product { Depends { name: "cpp" } PathProbe { id: probe pathSuffixes: ["include"] names: ["stdio.h"] } cpp.includePaths: probe.found ? [probe.path] : [] }
Property Documentation
This property contains the result list of all paths that were checked before a file was found (including the file names).
Default: Undefined
The list of environment variables that contains paths where to search files. Paths in the environment variable should be separated using qbs.pathListSeparator.
Default: Undefined
This property contains the found file's name (excluding the path).
Default: Undefined
This property contains the full path to the found file, including the file name.
Default: Undefined
A script that is executed for each file name before prepending file suffixes. Can be used to transform file names.
This property contains the full path where the found file is located (that is, the file directory).
Default: Undefined
A list of relative paths that are appended to each path where PathProbe searches for files. That is, the file should be located within one of the subfolders passed using this property.
Default: Undefined
The list of platform environment variables that contains paths where to search files. Paths in the environment variable should be separated using qbs.pathListSeparator.
Default: Undefined
The list of platform paths where to search files.
Default: ['/usr', '/usr/local']
on Unix hosts, empty otherwise