mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-09 00:04:30 -05: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
16 lines
580 B
Plaintext
16 lines
580 B
Plaintext
{
|
|
"name": "base_file_name",
|
|
"type": "function",
|
|
"groups": ["Files and Paths"],
|
|
"description": "Returns the base name of the file without the directory or file suffix.",
|
|
"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": "base_file_name('/home/qgis/data/country_boundaries.shp')",
|
|
"returns": "'country_boundaries'"
|
|
}],
|
|
"tags": ["suffix", "base", "directory", "name", "file", "folder", "path"]
|
|
}
|