In article <oster-E9E4D4.17162229072003newssvr23-ext.news.prodigy.com>,
David Phillip Oster <osterieee.org> wrote:
Many thanks! That looks like just what I need.> In article <not.here-ya02408000R3007030100130001news.dial.pipex.com>,
> [email]not.heredial.pipex.com[/email] (Phil Taylor) wrote:
>>> > I'm trying to invoke a Unix tool from within my CFM-Carbon app.
> > To do this I can create a file containing the command line input,
> > save it in the user's home directory and send an Apple event
> > to the Finder to launch Terminal with the file as input.
> > This all works fine provided that the command file is marked
> > as executable by the user, but I need to do this programmatically.
> > How can I perform the equivalent of chmod from within my app?
> Look in <Files.h> at FSSetCatalogInfo(), and struct FSPermissionInfo
> chmod is a system call. You can just call it, but you will need
> to dynamicly link to Mach-O from CFM. See:
> Calling Quartz Functions From a CFM Application
> for an example of doing this.
> Look in the System framework for chmod().
> From Terminal, do:
> man 2 chmod
> for more information.