summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-08-17 23:56:51 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-08-17 23:56:51 -0400
commit84c8905d527893bedc673e8a036b8b2ec89368b4 (patch)
treeffe8f20e45a5d6fdcc19927ae237c1bea2d769e0 /docs/markdown/snippets
parent1fd70a2a004900b7d97d9fc560e87d33266ecfed (diff)
downloadmeson-84c8905d527893bedc673e8a036b8b2ec89368b4.tar.gz
Revert "Add fs.relative_to()"
This reverts commit f52bcaa27fc125ab9ae583af466ba99c164169f3. It did not pass CI, and was merged anyway because there were two CI errors in the same cygwin job. The other error was not the fault of this commit, and since cygwin errors were glossed over because they were "expected", the presence of a new error *added* by this commit was overlooked. Per the meson development policy, PRs which result in CI errors can/should be reverted at will, no questions asked.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/fs_relative_to.md17
1 files changed, 0 insertions, 17 deletions
diff --git a/docs/markdown/snippets/fs_relative_to.md b/docs/markdown/snippets/fs_relative_to.md
deleted file mode 100644
index 82e6a4268..000000000
--- a/docs/markdown/snippets/fs_relative_to.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## `fs.relative_to()`
-
-The `fs` module now has a `relative_to` method. The method will return the
-relative path from argument one to argument two, if one exists. Otherwise, the
-absolute path to argument one is returned.
-
-```meson
-assert(fs.relative_to('c:\\prefix\\lib', 'c:\\prefix\\bin') == '..\\lib')
-assert(fs.relative_to('c:\\proj1\\foo', 'd:\\proj1\\bar') == 'c:\\proj1\\foo')
-assert(fs.relative_to('prefix\\lib\\foo', 'prefix') == 'lib\\foo')
-
-assert(fs.relative_to('/prefix/lib', '/prefix/bin') == '../lib')
-assert(fs.relative_to('prefix/lib/foo', 'prefix') == 'lib/foo')
-```
-
-In addition to strings, it can handle files, custom targets, custom target
-indices, and build targets.