summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.140
1 files changed, 40 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 1b95285e..0319b491 100644
--- a/txr.1
+++ b/txr.1
@@ -24459,6 +24459,46 @@ from a combined device number.
.coNP Function @ mknod
.synb
+.mets (chmod < path << mode )
+.syne
+.desc
+The
+.code chmod
+function changes the permissions of the filesystem objects
+specified by
+.metn path.
+It is a direct wrapper for the POSIX C library function of the same name.
+
+The permissions are specified by
+.metn mode ,
+an integer argument.
+
+The existing permissions may be obtained using the
+.code stat
+function.
+
+The function throws a
+.code file-error
+exception if an error occurs, otherwise it returns
+.codn t.
+
+.TP* Example:
+.cblk
+ ;; Set permissions of foo.txt to "rw-r--r--"
+ ;; (owner can read and write; group owner
+ ;; and other users can only read).
+
+ ;; numerically:
+ (chmod "foo.txt" #o644)
+
+ ;; symbolically:
+ (chmod "foo.txt" (logior s-irusr s-iwusr
+ s-irgrp
+ s-iroth))
+.cble
+
+.coNP Function @ mknod
+.synb
.mets (mknod < path < mode <> [ dev ])
.syne
.desc