• 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
FileManager Problem Post OS X 10.6 Installation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileManager Problem Post OS X 10.6 Installation


  • Subject: FileManager Problem Post OS X 10.6 Installation
  • From: dct <email@hidden>
  • Date: Mon, 21 Sep 2009 15:26:26 -0700

Prior to installing OS X 10.6 and Xcode 3.2 (64-bit), a bit of FileManager code for replacing one file with another, to wit:
if( [mgr fileExistsAtPath:path1] ) [mgr removeFileAtPath:path1 handler:nil];
[mgr movePath:path0 toPath:path1 handler:nil];
run without any problem.


With the new OS X and Xcode I changed the code to:
if( [mgr fileExistsAtPath:path1] ) [mgr removeItemAtPath:path1 error:NULL];
[mgr moveItemAtPath:path0 toPath:path1 error:NULL];
which fails in that:
a. FileManager is aware of a file at the new location, i.e.,
(BOOL)fileOK = [mgr fileExistsAtPath:path1]; equals YES, but
b. the file now at path1 is empty, i.e.,
(int)nn = [hndl1 seekToEndOfFile]; equals 0
whereas the original File at path0 contained several thousand bytes.


Am I missing something?  Don Thompson
_______________________________________________

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: FileManager Problem Post OS X 10.6 Installation
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Problem with fontDescriptorWithFontAttributes:
  • Next by Date: CARenderer Example
  • Previous by thread: Re: Why am I always getting the linker error: 'duplicate symbol'...?
  • Next by thread: Re: FileManager Problem Post OS X 10.6 Installation
  • Index(es):
    • Date
    • Thread