diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-04-16 07:08:05 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-04-16 07:08:05 -0700 |
commit | 83aea1f74dd3de219de053d9162f8b217b0530ca (patch) | |
tree | 0f44c6424a853a88bbe80c074f7525c1c343d39a /txr.1 | |
parent | 656dfb6b5ebde7c8e719fa34570c6725cc3c1640 (diff) | |
download | txr-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.1 | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -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 |