diff options
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 29 |
1 files changed, 25 insertions, 4 deletions
@@ -57880,15 +57880,18 @@ from a combined device number. .coNP Function @ chmod .synb -.mets (chmod < path << mode ) +.mets (chmod < target << mode ) .syne .desc The .code chmod -function changes the permissions of the filesystem objects +function changes the permissions of the filesystem object specified by -.metn path . -It is a direct wrapper for the POSIX C library function of the same name. +.metn target . +It is implemented in terms of the POSIX functions +.code chmod +and +.codn fchmod . The permissions are specified by .metn mode , @@ -57903,6 +57906,24 @@ The function throws a exception if an error occurs, otherwise it returns .codn t . +The +.meta target +argument may be a character string, in which case it specifies a pathname in +the filesystem. In this case, the POSIX function +.code chmod +is invoked. + +The +.meta target +argument may also be an integer file descriptor, or a stream. In these two +cases, the POSIX +.code fchmod +function is invoked. For a stream +.metn target , +the integer file descriptor is retrieved from the stream using +.code fileno +function. + .TP* Example: .verb ;; Set permissions of foo.txt to "rw-r--r--" |