diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-06-08 16:07:42 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-06-08 16:52:48 -0400 |
commit | ed19eb24434a25babae90909b38eedd6315246f4 (patch) | |
tree | 16a03aeac950d15b9328f97401a91be5a160017e | |
parent | f2b678ef68053a3aa024e7ebd3478bd1d8735dde (diff) | |
download | meson-ed19eb24434a25babae90909b38eedd6315246f4.zip meson-ed19eb24434a25babae90909b38eedd6315246f4.tar.gz meson-ed19eb24434a25babae90909b38eedd6315246f4.tar.bz2 |
document the enhancement to the Fs module permitting File arguments
Add a release notes snippet too!
-rw-r--r-- | docs/markdown/Fs-module.md | 11 | ||||
-rw-r--r-- | docs/markdown/snippets/fs-module-accepts-files.md | 6 |
2 files changed, 14 insertions, 3 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md index df9f305..663aba4 100644 --- a/docs/markdown/Fs-module.md +++ b/docs/markdown/Fs-module.md @@ -3,6 +3,10 @@ This module provides functions to inspect the file system. It is available starting with version 0.53.0. +Since 0.59.0, all functions accept `files()` objects if they can do something +useful with them (this excludes `exists`, `is_dir`, `is_file`, `is_absolute` +since a `files()` object is always the absolute path to an existing file). + ## File lookup rules Non-absolute paths are looked up relative to the directory where the @@ -35,8 +39,8 @@ name exists on the file system. ### is_symlink -Takes a single string argument and returns true if the path pointed to -by the string is a symbolic link. +Takes a single string or (since 0.59.0) `files()` argument and returns true if +the path pointed to by the string is a symbolic link. ## File Parameters @@ -44,7 +48,8 @@ by the string is a symbolic link. *since 0.54.0* -Return a boolean indicating if the path string specified is absolute, WITHOUT expanding `~`. +Return a boolean indicating if the path string or (since 0.59.0) `files()` +specified is absolute, WITHOUT expanding `~`. Examples: diff --git a/docs/markdown/snippets/fs-module-accepts-files.md b/docs/markdown/snippets/fs-module-accepts-files.md new file mode 100644 index 0000000..8c602fd --- /dev/null +++ b/docs/markdown/snippets/fs-module-accepts-files.md @@ -0,0 +1,6 @@ +## Fs Module now accepts files objects + +It is now possible to define a `files()` object and run most Fs module +functions on the file, rather than passing a string and hoping it is in the +same directory. + |