summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-04-18 10:41:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-04-18 10:41:34 -0700
commitb147d0de47a5bb55c2c32e4ef2af53bdb619a51e (patch)
treeeca05504139f1658cabb3ef5007698cc7eb91cd2 /share
parent21c99d4de03c9a90115abdf24344bf4ecc79575c (diff)
downloadtxr-b147d0de47a5bb55c2c32e4ef2af53bdb619a51e.tar.gz
txr-b147d0de47a5bb55c2c32e4ef2af53bdb619a51e.tar.bz2
txr-b147d0de47a5bb55c2c32e4ef2af53bdb619a51e.zip
path-testing functions: accept file descriptor.
* share/txr/stdlib/path-test.tl (do-path-test): Pass all argument types to statfun, except if they are of type stat. * txr.1: Documented.
Diffstat (limited to 'share')
-rw-r--r--share/txr/stdlib/path-test.tl7
1 files changed, 3 insertions, 4 deletions
diff --git a/share/txr/stdlib/path-test.tl b/share/txr/stdlib/path-test.tl
index 4f589fef..b57e13dd 100644
--- a/share/txr/stdlib/path-test.tl
+++ b/share/txr/stdlib/path-test.tl
@@ -25,10 +25,9 @@
;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(defun sys:do-path-test (statfun path testfun)
- [testfun (if (or (stringp path)
- (streamp path))
- (ignerr [statfun path])
- path)])
+ [testfun (if (typep path 'stat)
+ path
+ (ignerr [statfun path]))])
(eval-only
(defmacro sys:path-test ((sym statfun path) . body)