• 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
Least Expensive File Copy Method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Least Expensive File Copy Method?


  • Subject: Least Expensive File Copy Method?
  • From: Buzz Andersen <email@hidden>
  • Date: Sat, 31 Aug 2002 22:44:08 -0600

Hi,
I'm looking to deal with file copy operations that may involve large numbers of files, large amounts of data, and a lot of time. Ideally, I'm trying to limit the impact of such operations on the Finder and my own application. To this end, I have detached an NSThread to allow the operations to happen asynchronously, and this helps a lot in terms of avoiding the dreaded "beach ball."

Even still, copying all of this data tends to have a very negative impact on my Mac's responsiveness. Maybe this is unavoidable (now that I think about it, I don't remember ever sitting around using Photoshop while copying a gig worth of files through the Finder :-) ), but if anyone knows of a better way (perhaps a more low-level method?) to do the copy I'd like to know.

So far, I have tried these two methods:

The NSFileManager way:

[fileman copyPath: source toPath: destination handler: self];

The NSWorkspace way:

[workspace performFileOperation: NSWorkspaceCopyOperation source: source destination: destination files: files tag: tag];

Of the two, the File Manager seems to have the least impact on the system (I send NSWorkspace the "noteFileSystemChanged:" after the copy to make sure the copied files show up). Again, though, if there is a better way, I'd definitely like to know!

Thanks very sincerely for everyone's continuing help...

--
Buzz Andersen
email: email@hidden
web: http://www.scifihifi.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: How to decode this mystery key…
  • Next by Date: Problem with 10.2 after a clean active target
  • Previous by thread: AppKit now thread-safe?
  • Next by thread: Problem with 10.2 after a clean active target
  • Index(es):
    • Date
    • Thread