Re: List folders/ Files recursively

2010-10-06 Thread B Smith-Mannschott
On Wed, Oct 6, 2010 at 16:59, Justin Kramer wrote: > On Oct 6, 8:39 am, B Smith-Mannschott wrote: > > On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > > > ; prints all files > > > (import 'java.io.File) > > > (defn walk [dirpath] > > > (doseq [file (-> dirpath File. file-seq)] > > > (println

Re: List folders/ Files recursively

2010-10-06 Thread Justin Kramer
I should mention that Ben's solution is still nice and is basically how tree-seq is implemented under the hood. It is more idiomatic than using loop/recur (for most use cases). Justin On Oct 6, 10:59 am, Justin Kramer wrote: > On Oct 6, 8:39 am, B Smith-Mannschott wrote: > > > On Wed, Oct 6, 20

Re: List folders/ Files recursively

2010-10-06 Thread Justin Kramer
On Oct 6, 8:39 am, B Smith-Mannschott wrote: > On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > > ; prints all files > > (import 'java.io.File) > > (defn walk [dirpath] > >  (doseq [file (-> dirpath File. file-seq)] > >     (println (.getPath file)  ))) > > This doesn't do what you said you wanted

Re: List folders/ Files recursively

2010-10-06 Thread Abraham
Thanks a lot .. really good On Oct 6, 5:39 pm, B Smith-Mannschott wrote: > On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > > Dear All , > > > I wanted to list  the files of a folder , if a folder within , then it > > should list the files of that folder and so on.. ie recursively list > > files o

Re: List folders/ Files recursively

2010-10-06 Thread B Smith-Mannschott
On Wed, Oct 6, 2010 at 08:49, Abraham wrote: > Dear All , > > I wanted to list the files of a folder , if a folder within , then it > should list the files of that folder and so on.. ie recursively list > files of folders > > I tried with recur & loop and could not do it . Then i searched the >