27 lines
761 B
YAML
27 lines
761 B
YAML
name: join_paths
|
|
returns: str
|
|
since: 0.36.0
|
|
description: |
|
|
Joins the given strings into a file system path segment. For example
|
|
`join_paths('foo', 'bar')` results in `foo/bar`. If any one of the
|
|
individual segments is an absolute path, all segments before it are
|
|
dropped. That means that `join_paths('foo', '/bar')` returns `/bar`.
|
|
|
|
*(since 0.49.0)* Using the `/` operator on strings is equivalent to calling
|
|
[[join_paths]].
|
|
|
|
```meson
|
|
# res1 and res2 will have identical values
|
|
res1 = join_paths(foo, bar)
|
|
res2 = foo / bar
|
|
```
|
|
|
|
warnings:
|
|
- Don't use [[join_paths]] for sources in [[library]] and [[executable]]. You should use [[files]] instead.
|
|
|
|
varargs:
|
|
name: part
|
|
type: str
|
|
description: The path parts to join.
|
|
min_varargs: 1
|