[plt-scheme] Reading a directory structure

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Wed Mar 25 15:05:38 EDT 2009

(define (list-directories path)
  (filter (lambda (f) (directory-exists? (build-path path f)))
          (directory-list path)))

But more importantly, you should read 
http://docs.plt-scheme.org/reference/Filesystem.html. Things like 
`find-files' might be more suited.


aditya shukla wrote:
> Hello guys i am back , i am trying to read a directory structure eg 
> ./  such that all the directories within it are returned in a list and 
> then I can use them for further processing .Is there a function which 
> takes the path as an input and returns all the directories in it , in 
> a list?
> Aditya
> ------------------------------------------------------------------------
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.