[plt-scheme] get-directory question
Probably best to use build-path with the result of (get-directory) and
the elements of directory-list.
Robby
On Sunday, June 21, 2009, praimon <praimon at gmail.com> wrote:
> 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
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>