Re: Interrupt copyItemAtPath
Re: Interrupt copyItemAtPath
- Subject: Re: Interrupt copyItemAtPath
- From: "gMail.com" <email@hidden>
- Date: Sun, 07 Nov 2010 22:09:20 +0100
- Thread-topic: Interrupt copyItemAtPath
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 <email@hidden>
> Data: Sat, 6 Nov 2010 20:29:43 -0500
> A: "gMail.com" <email@hidden>
> Cc: <email@hidden>
> 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 (email@hidden)
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:
This email sent to email@hidden