On Feb 16, 2007, at 1:04 PM, [EMAIL PROTECTED] wrote:

How would I go about determining if a given folderitem is an executable file? This only has to work on OSX (10.3+).

It depends on what you mean. Other people have said how to tell whether the file has execute permissions set. But those can be set for any file. If, on the other hand, you want to know how to tell whether a file consists of executable code, then that's a little more difficult. If the first eight bytes of the file are 'Joy!peff', then it is probably a PEF executable. Mach-O executables also begin with a header whose structure is documented in Apple's Mach-O docs, but I don't know offhand an easy test for Mach-O format.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to