1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-20 10:40:19 +02:00

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.)
This commit is contained in:
Gary Houston 1999-09-11 14:12:14 +00:00
parent 08cc62c7d9
commit 77242ff9cd
5 changed files with 21 additions and 0 deletions

5
NEWS
View file

@ -46,6 +46,11 @@ Return a new port with the associated print state PRINT-STATE.
Return the print state associated with this port if it exists,
otherwise return #f.
*** New function: directory? OBJECT
Returns a boolean indicating whether OBJECT is a directory port as
returned by `opendir'.
* Changes to the scm_ interface
** The internal representation of subr's has changed

1
THANKS
View file

@ -10,6 +10,7 @@ Bug reports and fixes from:
Greg Badros
Rodney Brown
Ian Grant
Dirk Herrmann
Anders Holst
Karoly Lorentey
Han-Wen Nienhuys

View file

@ -1,3 +1,10 @@
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.)
1999-09-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* backtrace.c (display_frame_expr): Don't print a newline.

View file

@ -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

View file

@ -66,6 +66,7 @@ extern SCM scm_rename SCM_P ((SCM oldname, SCM newname));
extern SCM scm_delete_file SCM_P ((SCM str));
extern SCM scm_mkdir SCM_P ((SCM path, SCM mode));
extern SCM scm_rmdir SCM_P ((SCM path));
extern SCM scm_directory_p (SCM obj);
extern SCM scm_opendir SCM_P ((SCM dirname));
extern SCM scm_readdir SCM_P ((SCM port));
extern SCM scm_rewinddir SCM_P ((SCM port));