You should /always/ perform I/O on a secondary thread whenever possible. Every I/O you perform on the UI thread is an opportunity for hangs or unresponsiveness. Grand Central Dispatch is your friend here.
-- michael On 04 Oct, 2010, at 05:54, Guillem Palou wrote: > I don't think so, > > If time is a constraint, try running the delete process in a background > thread, if it is not a problem. > > On Oct 4, 2010, at 10:24 AM, Oleg Krupnov wrote: > >> Hi Guillem, >> >> You are correct, in many cases the number of files will not be big, so >> it should not matter too much, but using the opportunity, I decided to >> illuminate myself regarding the possibilities there are in the file >> system. >> >> I had an idea that because the directory tree is growing from a single >> root, there *might* be a possibility to axe it off with a single hit. >> Is it possible? >> >> Thanks. >> >> On Mon, Oct 4, 2010 at 11:18 AM, Guillem Palou <guillem.pa...@gmail.com> >> wrote: >>> When removing directories, the OS should remove all the tree created in the >>> filesystem. I think you cannot do anything else? >>> Is it so critical? How many files do you have to delete? >>> >>> On Oct 4, 2010, at 10:12 AM, Oleg Krupnov wrote: >>> >>>> Let me make the question more clear: I am aware of functions like >>>> [NSFileManager removeItemAtPath: error:], but what they do under the >>>> hood is they iterate through the subdirectories and files and delete >>>> them first. This takes some time. I am interested if it is possible to >>>> do this instantly, without even implicit recursion. Just remove the >>>> directory and the files and subdirectories would disappear? >>>> >>>> Thanks! >>>> >>>> On Mon, Oct 4, 2010 at 11:03 AM, Oleg Krupnov <oleg.krup...@gmail.com> >>>> wrote: >>>>> Hi, >>>>> >>>>> Is there a way to delete a directory instantly and completely without >>>>> first deleting all its subdirectories and files recursively? >>>>> >>>>> Thanks. >>>>> >>>>> Oleg. >>>>> >>>> _______________________________________________ >>>> >>>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >>>> >>>> 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: >>>> http://lists.apple.com/mailman/options/cocoa-dev/guillem.palou%40gmail.com >>>> >>>> This email sent to guillem.pa...@gmail.com >>> >>> > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/mikey-san%40bungie.org > > This email sent to mikey-...@bungie.org _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com