diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-02 08:44:33 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-02 08:44:33 -0700 |
commit | 64d3f8fcc8ef6e83e6fd789614e1aadfa526d18d (patch) | |
tree | e8bc344e3bb388c4c66a7e58704341fdc8ef833c /txr.1 | |
parent | b9d23bcf53ee7b041b511a25a36291ae7166c73b (diff) | |
download | txr-64d3f8fcc8ef6e83e6fd789614e1aadfa526d18d.tar.gz txr-64d3f8fcc8ef6e83e6fd789614e1aadfa526d18d.tar.bz2 txr-64d3f8fcc8ef6e83e6fd789614e1aadfa526d18d.zip |
Support lstat and fstat.
* stream.h (statf): Declaration removed.
* sysif.c (w_stat): Function takes val instead of const wchar_t *
as leftmost argument.
(w_lstat, w_fstat): New static functions, with same interface as w_stat.
(stat_to_list, stat_impl): New static functions.
(statp, statl): New static functions.
(statf): Function removed, name re-used for new static function.
(sysif_init): stat intrinsic registered to statp function, not statf.
lstat and fstat intrinsics registered to statl and statf.
* txr.1: Documented lstat and fstat.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -29074,9 +29074,11 @@ attempt. .SS* Unix Filesystem Manipulation -.coNP Function @ stat +.coNP Functions @, stat @, lstat and @ fstat .synb .mets (stat << path ) +.mets (lstat << path ) +.mets (fstat << stream ) .syne .desc The @@ -29106,6 +29108,32 @@ property has the same value as the .code st_dev field. +If +.meta path +refers to a symbolic link, the +.code stat +function retrieves information about the target of the link, if it exists, +or else throws an exception of type +.codn file-error . + +The +.code lstat +function behaves the same as +.code stat +or objects which are not symbolic links. For a symbolic link, it retrieves +information about the link itself, rather than its target. + +The +.code fstat +function retrieves information about the file system object associated with +the open stream +.metn stream . +The stream must be of a kind from which the +.code fileno +function can retrieve a file descriptor, otherwise an exception of type +.code file-error +is thrown. + .coNP Special variables @, s-ifmt @, s-iflnk @, s-ifreg @, s-ifblk ... , @ s-ixoth The following variables exist, having integer values. These are bitmasks |