summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-04-16 07:08:05 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-04-16 07:08:05 -0700
commit83aea1f74dd3de219de053d9162f8b217b0530ca (patch)
tree0f44c6424a853a88bbe80c074f7525c1c343d39a /txr.1
parent656dfb6b5ebde7c8e719fa34570c6725cc3c1640 (diff)
downloadtxr-83aea1f74dd3de219de053d9162f8b217b0530ca.tar.gz
txr-83aea1f74dd3de219de053d9162f8b217b0530ca.tar.bz2
txr-83aea1f74dd3de219de053d9162f8b217b0530ca.zip
Adding chmod.
* configure: Detect chmod. * sysif.c (chmod_wrap): New function. (sysif_init): Register chmod intrinsic. * txr.1: Documented. * tl.vim, txr.vim: Regenerated.
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