[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-user: how I can check whether a directory exists with scheme
- To: geda-user@xxxxxxxx
- Subject: gEDA-user: how I can check whether a directory exists with scheme
- From: Karsten Einwich <karsten.einwich@xxxxxxxxxxxxxx>
- Date: Thu, 12 May 2005 15:32:55 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: geda-user-outgoing@seul.org
- Delivered-to: geda-user@seul.org
- Delivery-date: Thu, 12 May 2005 09:33:37 -0400
- Organization: Fraunhofer IIS, Außenstelle EAS Dresden
- Reply-to: geda-user@xxxxxxxx
- Sender: owner-geda-user@xxxxxxxx
- User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040621
Hallo,
I want to parse a root directory for
other subdirectories.
Therefore I use the code like this
....
(do
( (entry (readdir dir) (readdir dir)))
( (eof-object? entry) )
(let ((sub_dir (opendir (string-append root_path "/" entry))))
(if (sub_dir) ...
This code will fail with a System Error if entry
a file name instead a directory.
opendir seems not deliver a #f like described in
the SCM-manual by Aubrey Jaffer.
Is there an other solution to check whether a string
corresponds to an existing directory ?
Rhanks a lot
Karsten