diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Fs-module.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md index 64883c0..274788c 100644 --- a/docs/markdown/Fs-module.md +++ b/docs/markdown/Fs-module.md @@ -165,6 +165,24 @@ new = fs.replace_suffix(original, '') # /opt/foo.dll Returns the parent directory (i.e. dirname). +```meson +new = fs.parent('foo/bar') # foo +new = fs.parent('foo/bar/baz.dll') # foo/bar +``` + ### name Returns the last component of the path (i.e. basename). + +```meson +fs.name('foo/bar/baz.dll.a') # baz.dll.a +``` + +### stem + +Returns the last component of the path, dropping the last part of the suffix + +```meson +fs.stem('foo/bar/baz.dll') # baz +fs.stem('foo/bar/baz.dll.a') # baz.dll +``` |