• 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: Unix -> Cocoa question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unix -> Cocoa question


  • Subject: Re: Unix -> Cocoa question
  • From: Cameron Hayne <email@hidden>
  • Date: Tue, 6 May 2003 18:28:56 -0400
  • Organization: Hayne of Tintagel

Alec Carlson wrote:
> unix file system calls - specifically fstat() and stat(). These calls work
> correctly in all cases except where the target file is an OS X application
> bundle. In that case, both stat calls fail with a ENOENT - "No such file or
> directory" error. Since application bundles are special types of
> directories, I'm assuming there is a problem with these unix functions and
> these OS X specific file types.

The following test program works fine for me:
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
int main(void)
{
struct stat info;
int status = stat("/Applications/Safari.app", &info);
printf("stat returned %d\n", status);
return 0;
}

Maybe you were forgeting the ".app" extension?


Cameron Hayne
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: set NSRunAlertPanel to be the frontmost window
  • Next by Date: Re: Cocoa - Naive questions about memory
  • Previous by thread: Re: Unix -> Cocoa question
  • Next by thread: set NSRunAlertPanel to be the frontmost window
  • Index(es):
    • Date
    • Thread