Debian Codegraph @

subprojects/meson-docs/docs/yaml/functions/join_paths.yaml

raw
1 name: join_paths
2 returns: str
3 since: 0.36.0
4 description: |
5 Joins the given strings into a file system path segment. For example
6 `join_paths('foo', 'bar')` results in `foo/bar`. If any one of the
7 individual segments is an absolute path, all segments before it are
8 dropped. That means that `join_paths('foo', '/bar')` returns `/bar`.
9
10 *(since 0.49.0)* Using the `/` operator on strings is equivalent to calling
11 [[join_paths]].
12
13 ```meson
14 # res1 and res2 will have identical values
15 res1 = join_paths(foo, bar)
16 res2 = foo / bar
17 ```
18
19 warnings:
20 - Don't use [[join_paths]] for sources in [[library]] and [[executable]]. You should use [[files]] instead.
21
22 varargs:
23 name: part
24 type: str
25 description: The path parts to join.
26 min_varargs: 1