Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any better way to determine if file is executable?




On Oct 31, 2007, at 8:40 AM, Devon Ferns wrote:

Anyways, I pretty much copied some code from the link I gave before and it works very fast and finds
some other executables that my previous method did not. Thanks to whoever at Apple that wrote it.

You're welcome. :) For future reference, most of the CheckExecutableArchitecture functionality is available in Leopard via CFBundle/NSBundle APIs, CFBundleCopyExecutableArchitectures(), CFBundleCopyExecutableArchitecturesForURL(), and -[NSBundle executableArchitectures]. See the Leopard release notes for more details. For the purposes of this assignment, CFBundleCopyExecutableArchitecturesForURL() would suffice to detect Mach-o executables, but it does not distinguish PEF/CFM or other types of executables.


Douglas Davidson
_______________________________________________


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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Re: Any better way to determine if file is executable? (From: Charles Steinman <email@hidden>)
 >Re: Any better way to determine if file is executable? (From: Devon Ferns <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.