diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-11-18 00:04:33 -0500 |
---|---|---|
committer | Michael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com> | 2020-02-06 12:54:38 -0500 |
commit | dcb7043403b227a8351b5864d5b856a2c81b69b9 (patch) | |
tree | 50565125fcfc80b76be5fe6c9786837b33f28395 /docs | |
parent | 4556343d95d8d64c7ab9bbbf1564b53940579f7f (diff) | |
download | meson-dcb7043403b227a8351b5864d5b856a2c81b69b9.zip meson-dcb7043403b227a8351b5864d5b856a2c81b69b9.tar.gz meson-dcb7043403b227a8351b5864d5b856a2c81b69b9.tar.bz2 |
fs: add expanduser method
this should help users specify leading `~` in various Meson options and variables
without refactoring lots of places inside Meson itself.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Fs-module.md | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md index 36b4c4a..3b33e7f 100644 --- a/docs/markdown/Fs-module.md +++ b/docs/markdown/Fs-module.md @@ -37,7 +37,7 @@ by the string is a symbolic link. ### is_absolute -Return a boolean indicating if the path string specified is absolute for this computer, WITHOUT expanding `~`. +Return a boolean indicating if the path string specified is absolute, WITHOUT expanding `~`. Examples: @@ -96,7 +96,19 @@ fs.is_samepath(p, s) # false ## Filename modification -The files need not actually exist yet for these methods, as they are just string manipulation. +The files need not actually exist yet for these path string manipulation methods. + +### expanduser + +A path string with a leading `~` is expanded to the user home directory + +Examples: + +```meson +fs.expanduser('~') # home directory + +fs.expanduser('~/foo') # <homedir>/foo +``` ### as_posix |