• 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: Serious bug in NSFileManager fileExistsAtPath:?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Serious bug in NSFileManager fileExistsAtPath:? (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: if an NSWindow is a drawer, how can I find the NSDrawer instance?
  • Next by Date: Re: Serious bug in NSFileManager fileExistsAtPath:?
  • Previous by thread: Serious bug in NSFileManager fileExistsAtPath:?
  • Next by thread: Re: Serious bug in NSFileManager fileExistsAtPath:?
  • Index(es):
    • Date
    • Thread