Ken,
I have checked FSCopyObjectAsync and the copy works well.
I can get my callback function called so I can observe the working progress
as the kFSOperationBytesCompleteKey and kFSOperationTotalBytesKey and get
the kFSOperationStageComplete status. Well.

But I can't figure out yet how to interrupt the copy.
For example, if the file to copy is 20GB and after 1GB copied I would like
to stop the copy, how can I do? Should I delete the destination file such a
way to create an error?
Any idea?


--
Leo

> Da: Ken Thomases <k...@codeweavers.com>
> Data: Sat, 6 Nov 2010 20:29:43 -0500
> A: "gMail.com" <mac.iphone....@gmail.com>
> Cc: <cocoa-dev@lists.apple.com>
> Oggetto: Re: Interrupt copyItemAtPath
> 
> On Nov 6, 2010, at 5:27 PM, gMail.com wrote:
> 
>> I copy a 14GB file with
> 
>> Since the copy could take several minutes, I would grant the user the
>> opportunity to interrupt the copy pressing a given button.
> 
>> Or should I use the latest methods from FSCopyObject.c ?
> 
> FSCopyObject.c?  From Apple's sample code?  I think that's very outdated.
> 
> Are you aware of the FSCopyObjectAsync API in the File Manager?  That sounds
> like what you should be using.  I don't know for sure, but I'd be very
> surprised if it didn't copy all the appropriate file metadata.
> 
> Cheers,
> Ken
> 


_______________________________________________

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

Reply via email to