I'm looking for a way to programatically set the 'executable' bit on a file on OS X. I don't want to invoke 'chmod a+x' but I want the same effect as the chmod call. Any suggestions? A carbon API or any other C/C++ function would work...
+1
A:
There is a "chmod" C library call. Go to a terminal window and type "man 2 chmod".
Paul Tomblin
2009-05-29 18:08:31
+2
A:
See chmod(2), e.g. http://www.manpagez.com/man/2/chmod/osx-10.4.php (I think it's unchanged in 10.5).
Alex Martelli
2009-05-29 18:08:37
Since it's standard POSIX, they aren't going to change it any time soon.
Paul Tomblin
2009-05-29 18:15:35
Likely not, but, you know Apple -- they might always have some nifty (backwards-compatible) extension up their sleeve;-).
Alex Martelli
2009-05-29 18:39:53