From 77242ff9cd89096044093ba6012ec4bd34668e28 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sat, 11 Sep 1999 14:12:14 +0000 Subject: 1999-09-11 Gary Houston * 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.) --- libguile/filesys.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libguile/filesys.c') 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 -- cgit v1.2.3