diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-12-18 22:53:47 -0500 |
---|---|---|
committer | Michael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com> | 2020-02-06 12:54:38 -0500 |
commit | 92534855cc11e0939f769e19d995be0605be2fb2 (patch) | |
tree | 40ff109bb9698b218aeba036e1487b9b7eb56fa5 /docs | |
parent | dcb7043403b227a8351b5864d5b856a2c81b69b9 (diff) | |
download | meson-92534855cc11e0939f769e19d995be0605be2fb2.zip meson-92534855cc11e0939f769e19d995be0605be2fb2.tar.gz meson-92534855cc11e0939f769e19d995be0605be2fb2.tar.bz2 |
doc: filesystem module
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Fs-module.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md index 3b33e7f..64883c0 100644 --- a/docs/markdown/Fs-module.md +++ b/docs/markdown/Fs-module.md @@ -9,8 +9,13 @@ Non-absolute paths are looked up relative to the directory where the current `meson.build` file is. If specified, a leading `~` is expanded to the user home directory. +Environment variables are not available as is the rule throughout Meson. +That is, $HOME, %USERPROFILE%, $MKLROOT, etc. have no meaning to the Meson +filesystem module. If needed, pass such variables into Meson via command +line options in `meson_options.txt`, native-file or cross-file. -Where possible, symlinks and parent directory notation are resolved to an absolute path. +Where possible, symlinks and parent directory notation are resolved to an +absolute path. ### exists @@ -42,7 +47,7 @@ Return a boolean indicating if the path string specified is absolute, WITHOUT ex Examples: ```meson -fs.is_absolute('~') # false unless you literally have a path with string name `~` +fs.is_absolute('~') # false home = fs.expanduser('~') fs.is_absolute(home) # true @@ -84,7 +89,7 @@ fs.is_samepath(x, z) # true fs.is_samepath(x, j) # false p = 'foo/bar' -q = 'foo/bar/../baz' +q = 'foo/bar/baz/..' r = 'buz' # a symlink pointing to foo/bar s = 'notapath' # non-existant directory @@ -93,7 +98,6 @@ fs.is_samepath(p, r) # true fs.is_samepath(p, s) # false ``` - ## Filename modification The files need not actually exist yet for these path string manipulation methods. |