• 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
Re: renaming directories and moving files into them (NSFileManager)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: renaming directories and moving files into them (NSFileManager)


  • Subject: Re: renaming directories and moving files into them (NSFileManager)
  • From: Andy Lee <email@hidden>
  • Date: Sun, 17 Apr 2011 01:58:01 -0400

On Apr 15, 2011, at 1:47 AM, Scott Anguish wrote:
>             if (foundRange.location > 0) { // should be comparing to NSNotFound, but that failed miserably.
>                 newShootPath=[shootPath stringByAppendingString:@“-APPL”];
>                 // make sure I’ve not already done this
>                 if (![self directoryExists:newShootPath]) {
>
>                     success=[fileManager moveItemAtPath:shootPath toPath:newShootPath error:&theError];
>                     NSLog(@"should be moving - %d",success);
>                     //success is true!
>
>                     // make the newShootPath, the shootPath for other files
>                     [shootPath autorelease];
>                     shootPath=[newShootPath retain];

This looks odd to me. Isn't shootPath going to become /tmp/boo/Friday-APPL, then /tmp/boo/Friday-APPL-APPL, etc.?

--Andy

_______________________________________________

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

References: 
 >renaming directories and moving files into them (NSFileManager) (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: Proper way to create a singleton without @synchronized ?
  • Next by Date: Re: Proper way to create a singleton without @synchronized ?
  • Previous by thread: Re: renaming directories and moving files into them (NSFileManager)
  • Next by thread: Re: renaming directories and moving files into them (NSFileManager)
  • Index(es):
    • Date
    • Thread