• 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: NSFileManager vs Non-Packaged application: 0 - 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileManager vs Non-Packaged application: 0 - 1


  • Subject: Re: NSFileManager vs Non-Packaged application: 0 - 1
  • From: stephane sudre <email@hidden>
  • Date: Mon, 7 Mar 2005 14:12:16 +0100


On Mar 7, 2005, at 1:31 PM, Stephane Sudre wrote:


On 7 mars 05, at 13:19, Bob Ippolito wrote:

Not all executable files are Mach-O or CFM. It could be a shell script, or a fat Mach-O file (which is 0xcafebabe, IIRC).

The documentation is correct, so is the implementation. The **underlying operating system** does NOT execute CFM files. They're treated more like documents that are handled by LaunchCFMApp. If there is a function to see if the given path is an "application", it would be in LaunchServices.

OK, so the NSFileManager isExecutableFileAtPath: is really just a wrapper around lstat and check for "x" flags...

Looks like there's a flag not documented in LSLaunchServices. When you look for all info available on a command line tool (a CoreFoundation tool), the flag 0x2000 is set in the flags part of the info. This flag is not documented in the LSInfo.h file.


Looks like there is no simple way to know if a file is an executable (I don't take into account shell scripts which I consider not to be executables).

_______________________________________________
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


  • Follow-Ups:
    • Re: NSFileManager vs Non-Packaged application: 0 - 1
      • From: "Sean McBride" <email@hidden>
    • Re: NSFileManager vs Non-Packaged application: 0 - 1
      • From: Finlay Dobbie <email@hidden>
References: 
 >NSFileManager vs Non-Packaged application: 0 - 1 (From: stephane sudre <email@hidden>)
 >Re: NSFileManager vs Non-Packaged application: 0 - 1 (From: Bob Ippolito <email@hidden>)
 >Re: NSFileManager vs Non-Packaged application: 0 - 1 (From: Stephane Sudre <email@hidden>)

  • Prev by Date: several NSConnections on my DO server ?
  • Next by Date: Re: NSFileManager vs Non-Packaged application: 0 - 1
  • Previous by thread: Re: NSFileManager vs Non-Packaged application: 0 - 1
  • Next by thread: Re: NSFileManager vs Non-Packaged application: 0 - 1
  • Index(es):
    • Date
    • Thread