[plt-scheme] get-directory question
hello,
Here's something I don't understand. On 4.1.5 winxp:
(filter file-exists? (directory-list (get-directory)))
will return the null list for just about every gotten directory.
I think what's happening is that the files returned by directory-list
have the current-directory's path prepended, and except in wild
coincidences, such files don't exist.
I can by-pass this 'problem' by explicitly setting the current-directory:
(let ([dir (get-directory)])
(current-directory dir)
(filter file-exists? (directory-list dir)))
Is there a better way?
regards,
praimon