On Wed, 3 Jul 2013, tim Rowledge wrote:
On 03-07-2013, at 12:38 PM, Chris Muller asqueaker@gmail.com wrote:
Whew, that's a lot of adjectives!
Indeed, a scrumptiously over-indulgent miscellany of amply audacious adjectives.
I vaguely understand by looking at #directoryContentsFor:do:. I guess I had thought #entries was the primitive itself, but I think you're saying calling #primLookupEntryIn:index: is inefficient to be calling again and again for just one entry.. Too bad.
Take a look at the appalling usages of #entries (which is the only real user of directoryContentsFor:). We even have code that enumerates the entire directory in order to find out if it is empty and can be deleted! Insanity! We find out if a file exists by enumerating everything using the primitive and then enumerating the resultant collection. Aaaargh! I think my brain just segfaulted.
Sometimes it's better if you don't look under the hood. :)
Levente
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: LOW: Launch on Warning