Re: FileManager Problem Post OS X 10.6 Installation
Re: FileManager Problem Post OS X 10.6 Installation
- Subject: Re: FileManager Problem Post OS X 10.6 Installation
- From: Greg Guerin <email@hidden>
- Date: Mon, 21 Sep 2009 17:42:33 -0700
Don Thompson wrote:
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.
How do you know the original file at path0 contained several thousand
bytes?
Is there a possibility it was a file with an empty data-fork but a
non-empty resource fork?
Also, if the old code ran without any problem, why change it?
-- GG
_______________________________________________
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