diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-12-09 15:36:28 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-12-09 15:36:28 -0800 |
commit | 6cf10451395c20fad177704a3b5032106d083b88 (patch) | |
tree | e3eeae3b9fdcffa109f1a96a3215e9feec469746 /txr.1 | |
parent | 6a88c55cdf0bd3bd6fc33086529bf4e79fd1e03e (diff) | |
download | txr-6cf10451395c20fad177704a3b5032106d083b88.tar.gz txr-6cf10451395c20fad177704a3b5032106d083b88.tar.bz2 txr-6cf10451395c20fad177704a3b5032106d083b88.zip |
New function: path-dir-empty.
* lisplib.c (path_test_set_entries): Autoload entry for
path-dir-empty.
* share/txr/stdlib/path-test.tl (path-dir-empty): New
function.
* txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -58016,6 +58016,34 @@ for a socket and .code path-pipe-p for a named pipe. +.coNP Function @ path-dir-empty +.synb +.mets (path-dir-empty << path ) +.syne +.desc +The +.code path-dir-empty +function returns +.code t +if +.meta path +is an empty directory. + +Implementation note: this function performs a test similar to +.codn path-dir-p ; +then, if it is confirmed that +.meta path +is a directory, a directory stream is opened and entries are read. +If an entry is seen which has a name other than +.str . +or +.str .. +then it is concluded that the directory is not empty and +.code nil +is returned. If no such entry is seen, then the directory is deemed empty and +.code t +is returned. + .coNP Functions @, path-setgid-p @ path-setuid-p and @ path-sticky-p .synb .mets (path-setgid-p << path ) |