diff options
author | Gary Houston <ghouston@arglist.com> | 1999-09-11 14:12:14 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1999-09-11 14:12:14 +0000 |
commit | 77242ff9cd89096044093ba6012ec4bd34668e28 (patch) | |
tree | 43e501017322f0fc62db1695167e806805fe1220 /libguile/filesys.c | |
parent | 08cc62c7d91de170838536d938a00ce980182d79 (diff) | |
download | guile-77242ff9cd89096044093ba6012ec4bd34668e28.tar.gz |
1999-09-11 Gary Houston <ghouston@easynet.co.uk>
* filesys.c (scm_directory_p): new procedure "directory?" Returns
a boolean indicating whether its argument is a directory
port as returned by opendir (thanks to Dirk Herrmann for the
suggestion.)
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r-- | libguile/filesys.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c index 96c4e9b30..83211dd70 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -581,6 +581,13 @@ scm_rmdir (path) long scm_tc16_dir; +SCM_PROC (s_directory_p, "directory?", 1, 0, 0, scm_directory_p); +SCM +scm_directory_p (SCM obj) +{ + return SCM_NIMP (obj) && SCM_DIRP (obj) ? SCM_BOOL_T : SCM_BOOL_F; +} + SCM_PROC (s_opendir, "opendir", 1, 0, 0, scm_opendir); SCM |