Re: file-seq and recursive directories

2010-02-02 Thread Michał Marczyk
On 2 February 2010 10:27, Michael Wood wrote: > Of course the above is Unix-centric.  On Windows you might not have > inode numbers (VFAT.  Not sure if ntfs has an inode number > equivalent.)  Also, I think I've heard that in Windows you can create > hard links to directories, so I don't know how

Re: file-seq and recursive directories

2010-02-02 Thread Michael Wood
On 2 February 2010 10:08, Jeff Rose wrote: > So what would that look like?  Is it sufficient to throw every > canonical directory path in a set and test for membership before > traversing down any directory? Yes, I think so, as long as you can fit all of them in memory. The other thing you could

Re: file-seq and recursive directories

2010-02-02 Thread Jeff Rose
So what would that look like? Is it sufficient to throw every canonical directory path in a set and test for membership before traversing down any directory? Or is that even sufficient because you could arrive at the same location through different paths... I wonder if you can get something more

Re: file-seq and recursive directories

2010-02-01 Thread ataggart
On Feb 1, 2:14 pm, Jim Van Donsel wrote: > Fair enough. > > But I guess the moral is that a file-seq should not be used unless you > have a well-controlled filesystem. Or more generally, all sequences may be infinite unless you know the backing data has no cycles, or you have some terminating/f

Re: file-seq and recursive directories

2010-02-01 Thread Jim Van Donsel
Fair enough. But I guess the moral is that a file-seq should not be used unless you have a well-controlled filesystem. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from

Re: file-seq and recursive directories

2010-02-01 Thread ataggart
On Feb 1, 6:22 am, Jim Van Donsel wrote: > The simple: > >      (file-seq (java.io.File. ".")) > > will loop forever if it hits a directory structure with recursive > links. > > Short of writing ugly code myself to detect such loops, is there > already a Clojure thingamabob that does this safely

Re: file-seq and recursive directories

2010-02-01 Thread Sean Devlin
Hmmm... to the best of my knowledge this has to be handled by the end developer. Could you post what you find out? Sean On Feb 1, 9:22 am, Jim Van Donsel wrote: > The simple: > >      (file-seq (java.io.File. ".")) > > will loop forever if it hits a directory structure with recursive > links. >

file-seq and recursive directories

2010-02-01 Thread Jim Van Donsel
The simple: (file-seq (java.io.File. ".")) will loop forever if it hits a directory structure with recursive links. Short of writing ugly code myself to detect such loops, is there already a Clojure thingamabob that does this safely? -Jim -- You received this message because you are