• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
newb- Overwriting a file or folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

newb- Overwriting a file or folder


  • Subject: newb- Overwriting a file or folder
  • From: Chris Paveglio <email@hidden>
  • Date: Tue, 1 Jul 2008 05:57:26 -0700 (PDT)

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:]?

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

  • Follow-Ups:
    • Re: newb- Overwriting a file or folder
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Font related question
  • Next by Date: Correct Order for CFRelease-ing CFNetwork Refs?
  • Previous by thread: Re: Focus Ring in NSBrowser Column
  • Next by thread: Re: newb- Overwriting a file or folder
  • Index(es):
    • Date
    • Thread