Re: EnumeratorAtPath and duplicate files during drag to open
Re: EnumeratorAtPath and duplicate files during drag to open
- Subject: Re: EnumeratorAtPath and duplicate files during drag to open
- From: Jerry Krinock <email@hidden>
- Date: Wed, 3 Feb 2010 22:07:23 -0800
On 2010 Feb 03, at 21:06, Trygve Inda wrote:
> Do I just need to keep a temporary array of paths that I have processed and
> search it for each file.
That's one way that would work. Another way would be to, before processing each item, iterate through its lineage, somethling like this:
parent = theItem ;
BOOL processThisItem = YES ;
do {
parent = [theItem parent] ;
if ([parent isInTheDroppedArray]) {
processThisItem = NO ;
break ;
}
} while (parent != nil) ;
if (processThisItem) {
...
}
I don't know if it would be any more or less efficient than your original idea. Probably depends on the "dimensions" of the typical drop.
> Could be a lot of searching if the user drops the
> entire Documents folder.
Yup. No matter how you do it.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden