Sean Allen wrote:
On Jan 9, 2009, at 3:58 AM, Paolo Bonzini wrote:
if i do:
file := File name: '/Users/Spooneybarger'
file all do: [ :e | e isDirectory ifTrue: [ e directories
printNl ] ]
What am I doing wrong?
"file all do:" is doing an "ls -lR" which is already slow. :-)
Since without my patch "e" is in turn a RecursiveFileWrapper (the kind
of object returned by #all), each send of #directories in the block
would in turn invoke a recursive descent. So that's a loop of "ls -
lR"s
inside an "ls -lR", and it's going to take a while. :-) Actually it's
going to be infinite, because sooner or later you'll do "e
directories"
on "/Users/Spooneybarger/..".