• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Copying large files with progress indicator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Copying large files with progress indicator


  • Subject: Copying large files with progress indicator
  • From: Mike Abdullah <email@hidden>
  • Date: Mon, 31 Jul 2006 17:04:14 +0100

Apologies if this topic had been covered fully before - I have searched the lists and Google for over an hour and not found anything useful!

Basically, I want to copy some large files to another disk on my system. At present, I'm using:

	[NSFileManager copyPath:toPath:handler]

Obviously, this ties up the app until it is done, offering me no decent solution for progress indication or canceling the copy if needed.

So, I figure I need to run the process in a separate thread. However, NSFileManager isn't thread safe :(
I figure that I can put it in a big lock, but then there's no decent way of finding out how far the task is progressing.


If I am copying lots of small files, then NSFileManager offers a fileManager:willProcessPath: method, but for copying a few large files, that is next to useless!

So basically what I am asking is, what is the best strategy for copying large files in Cocoa and providing full progress feedback and the ability to cancel the operation? (Without resorting to an NSTask also!)

Mike.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Copying large files with progress indicator
      • From: Scott Ribe <email@hidden>
  • Prev by Date: Re: launchd and Cocoa apps?
  • Next by Date: Re: NSHelpManager +openHelpAnchor:inBook: Does it work?
  • Previous by thread: Re: TextView text autowrap
  • Next by thread: Re: Copying large files with progress indicator
  • Index(es):
    • Date
    • Thread