On 16 Nov, 2013, at 8:18 am, Jens Alfke <[email protected]> wrote: > > > As for the deletion, I don’t know how long deleting 20,000 files will take; > you’d need to experiment. The OS only gives your process a limited amount of > time to respond to the enter-background (or terminate) notification before > killing the process, but I don’t know exactly how long that is. >
If you put all the files in a subdirectory and delete the subdirectory, I've found that to be pretty quick. You can also set up a background task which gets a reasonable amount of time to complete, plenty enough to delete files. Don't forget, your app could just be killed at any point during this, so when you restart, check your flag to see if the user asked for deltes, if it was set then make sure the files were actually deleted, or delete them at that point. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
