mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
handle map layer values These are treated as the file path to the layer. E.g. base_file_name(@some_variable_which_is_a_layer) will return the base file name of the layer's source
19 lines
554 B
Plaintext
19 lines
554 B
Plaintext
{
|
|
"name": "is_file",
|
|
"type": "function",
|
|
"groups": ["Files and Paths"],
|
|
"description": "Returns true if a path corresponds to a file.",
|
|
"arguments": [{
|
|
"arg": "path",
|
|
"description": "a file path or a map layer value. If a map layer layer value is specified then the file source of the layer will be used."
|
|
}],
|
|
"examples": [{
|
|
"expression": "is_file('/home/qgis/data/country_boundaries.shp')",
|
|
"returns": "true"
|
|
}, {
|
|
"expression": "is_file('/home/qgis/data/')",
|
|
"returns": "false"
|
|
}],
|
|
"tags": ["path", "file"]
|
|
}
|