summaryrefslogtreecommitdiff
path: root/docs/markdown/Fs-module.md
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2023-08-18 00:04:12 -0500
committerXavier Claessens <xclaesse@gmail.com>2023-08-18 07:46:08 -0400
commit946a3561c2f45b2e522f695a08516333cf7ec9d4 (patch)
tree84a7f16b6da32300686ee0554d440317aca92985 /docs/markdown/Fs-module.md
parent22f90fd469a2742a2bb2d4f79e4a585a525ea934 (diff)
downloadmeson-946a3561c2f45b2e522f695a08516333cf7ec9d4.tar.gz
Revert "Revert "Add fs.relative_to()""
This reverts commit 84c8905d527893bedc673e8a036b8b2ec89368b4. Fixed the cygwin failure...
Diffstat (limited to 'docs/markdown/Fs-module.md')
-rw-r--r--docs/markdown/Fs-module.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md
index cc67355b5..7ba4832a0 100644
--- a/docs/markdown/Fs-module.md
+++ b/docs/markdown/Fs-module.md
@@ -224,6 +224,20 @@ fs.stem('foo/bar/baz.dll.a') # baz.dll
project. If the file specified by `path` is a `files()` object it
cannot refer to a built file.
+### relative_to
+
+*Since 1.3.0*
+
+Return a relative filepath. In the event a relative path could not be found, the
+absolute path of `to` is returned. Relative path arguments will be assumed to be
+relative to `meson.current_source_dir()`.
+
+Has the following positional arguments:
+ - to `str | file | custom_tgt | custom_idx | build_tgt`: end path
+ - from `str | file | custom_tgt | custom_idx | build_tgt`: start path
+
+returns:
+ - a string
### copyfile