Re: newb- Overwriting a file or folder
Re: newb- Overwriting a file or folder
- Subject: Re: newb- Overwriting a file or folder
- From: Mike Abdullah <email@hidden>
- Date: Tue, 1 Jul 2008 15:03:51 +0100
On 1 Jul 2008, at 13:57, Chris Paveglio wrote:
Newb alert.
I'm trying to copy some files and folders from one location to
another. I would like to overwrite them at the destination. Is this
possible yet?
[theManager copyPath:theSettings toPath:theDestinationFile
handler:nil];
I've read the documentation: "The file specified in source must
exist, while destination must not yet exist." and also see this
older post regarding it: http://www.cocoabuilder.com/archive/message/cocoa/2005/3/30/131694
But that was a while ago (2005). Has this function been added in
xCode 3/Obj-C 2? I'm working on 10.4.11 with xCode 2.5 but I also
have 10.5/xC3 at home, but I'm not in front of it right now.
FWIW, Applescript makes it incredibly easy:
move folder "Safari" of folder myImport to folder "Library" of
folder myUserFolder with replacing
Is the only viable option to force-delete any files/folders already
there [removeFileAtPath:handler:]?
Correct, you must first delete them using removeFileAtPath: or send
them to the Trash with NSWorkspace. Of course, if this is something
your code is doing often, you could write a category method to
simplify it.
Thanks, Chris
_______________________________________________
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
_______________________________________________
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