Re: Serious bug in NSFileManager fileExistsAtPath:?
Re: Serious bug in NSFileManager fileExistsAtPath:?
- Subject: Re: Serious bug in NSFileManager fileExistsAtPath:?
- From: Andy Lee <email@hidden>
- Date: Sat, 21 May 2005 10:12:25 -0400
On May 21, 2005, at 9:50 AM, Stéphane Sudre wrote:
Which result shall be returned by the NSFileManager fileExistsAtPath: API when the file is 0 bytes?
From what I'm seeing, when a file is 0 bytes long (this is due to the fact that it was a Resource fork archived in a zip archive and then decompressed using OpenUp (or another one)), the result is NO.
Are you sure the NO is caused by the file being 0 bytes? I happened to have a gdb console open, so I tried this and got a YES answer:
(gdb) p (BOOL)[[NSFileManager defaultManager] fileExistsAtPath:@"/Users/alee/foo"]
$1 = 1 '\001'
"foo" is a file I created using touch:
[~]
10: touch .foo
[~]
11: ls -l .foo
-rw-r--r-- 1 alee wheel 0 21 May 10:07 .foo
--Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden