Hi all,

I'm writing a tool that needs to copy directories with a lot of files and a 
significant hierarchy (a home directory is a good analog).

I've implemented test versions of the following:

a. NSTask'ing rsync.  This works but provides terrible progress, as I have to 
parse the the made-for-human output.

b. FSCopyObjectAsync.  This provides excellent progress via its callback - 
bytes transferred/to go/total, file count, and even a rough estimate of 
throughput, but it also immediately stopped when it hit an unexpected thing - I 
think a UNIX socket - even with kFSFileOperationSkipSourcePermissionErrors set. 
 Oh and it's deprecated in 10.8.

c. copyfile.  Seems to be solid, provides the callback the ability to note an 
error and continue working, but has poor progress status.  I can't tell how 
many bytes have been written: the callback is only sometimes called for 
individual file progress, so I can't keep a running sum of bytes.  I could keep 
a running sum of files, but I will also have to do my own traversal to count 
them in the first place.

Is there anything that provides the level of progress that FSCopyObjectAsync 
does but gives the callback more control like copyfile() does?

Thanks,

--Jim


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to