Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask and copying lots of small files




On 30 Jan 2006, at 21:02, Sean McBride wrote:

On 2006-01-28 19:02, Jonathan Fewtrell said:

My app copies a directory from CD to the hard drive. The directory
contains a few hundred small files (say 10k each).

If I use NSFileManager's copyPath method, the process is very slow.

Maybe try the File Manager? 10.4 has the FSCopyObjectSync() API and for
older OSes there is this sample:


<https://developer.apple.com/samplecode/FSCopyObject/ FSCopyObject.html>

Maybe check out MoreFiles too:

<http://developer.apple.com/samplecode/MoreFilesX/MoreFilesX.html>


Thanks. I'll take a look.

In the meantime, running ditto through NSTask has suddenly started working smoothly in the same way it does in the Terminal. I've no idea why, as I don't think I changed any relevant code. Doesn't give a very comforting feel of robustness, so I'll check out your suggestions anyway.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden


This email sent to email@hidden
References: 
 >NSTask and copying lots of small files (From: Jonathan Fewtrell <email@hidden>)
 >Re: NSTask and copying lots of small files (From: "Sean McBride" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.