aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorMichael Hirsch, Ph.D <scivision@users.noreply.github.com>2019-11-10 23:38:16 -0500
committerMichael Hirsch, Ph.D <scivision@users.noreply.github.com>2019-11-17 00:17:04 -0500
commita320274179ef36aa5aeb4827f777027c3ab3d785 (patch)
tree00c5df8dc958f0e983b33f39f95477e588a71a9a /docs/markdown
parent67651271f60347b2d3cadd235a4abac0b3a1bc16 (diff)
downloadmeson-a320274179ef36aa5aeb4827f777027c3ab3d785.zip
meson-a320274179ef36aa5aeb4827f777027c3ab3d785.tar.gz
meson-a320274179ef36aa5aeb4827f777027c3ab3d785.tar.bz2
fs: get file size
fs: add samefile
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Fs-module.md20
1 files changed, 19 insertions, 1 deletions
diff --git a/docs/markdown/Fs-module.md b/docs/markdown/Fs-module.md
index 499b8d2..8ce5e32 100644
--- a/docs/markdown/Fs-module.md
+++ b/docs/markdown/Fs-module.md
@@ -36,9 +36,27 @@ by the string is a symbolic link.
### hash
-The `hash` method computes the requested hash sum of a file.
+The `fs.hash(filename)` method computes the requested hash sum of a file.
The available hash methods include: md5, sha1, sha224, sha256, sha384, sha512.
+### samefile
+
+The `fs.samefile(filename1, filename2)` method allows determining if two filenames refer to the same file.
+Perhaps a meson.build file in one place refer to a symlink and in another place a
+relative path and/or absolute path. The `samefile` method allows determining if these
+are the same file.
+
+Examples:
+
+```meson
+x = 'foo.txt'
+y = 'sub/../foo.txt'
+z = 'bar.txt' # a symlink pointing to foo.txt
+
+fs.samefile(x, y) # true
+fs.samefile(x, z) # true
+```
+
## Filename modification