Re: duplicate a file
Re: duplicate a file
- Subject: Re: duplicate a file
- From: Prachi Gauriar <email@hidden>
- Date: Wed, 28 Dec 2005 14:52:42 -0600
On Dec 28, 2005, at 8:15 AM, Bas Scheffers wrote:
Francesca P said:
I've to duplicate a file in my desktop to another folder... in my
cocoa apps.
I'm able to do this with applescript.
And I can use applescript in cocoa, I have no problem.
But it is slow......
Can I use another method in cocoa to do this???
Yes, you can do it using NSFileManager's -copyPath:toPath:handler:
Or perhaps better, check out NSWorkspace's -
performFileOperation:source:destination:files:tag: using either
NSWorkspaceCopyOperation or NSWorkspaceDuplicateOperation, depending
on your needs. This will more accurately mimic the Finder's operation.
-Prachi
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden