[comp.sys.amiga.programmer] Changing default file protection flags

meranda@clipper.cis.ohio-state.edu (deron meranda) (02/07/91)

When a new file is opened, it normally receives the default file
protection bits of ----RWED.  However, is it possible to change these
default flags, say, depending upon the program name?  For instance,
files matching these patterns would inherit their own flags:

      *.zoo    ---ARW-D
      *.lzh    ---ARW-D
      *.c      ----RW-D
      *.info   H---RWED

      ...etc...

As a possible solution, would it be possible to put a patch into the
DOS library for the Open packet?  How would that be done?  Also,
are there any tricky problems with something like this that might
come up?

I know that you can always program the extra code when its your
program that opens the file, but most programs do not bother with
this.  It is probably also possible to write a script which will
traverse a directory, changing protection flags -- but I would
like a more permanent and invisible fix.

Any help will be appreciated!

Deron E. Meranda  ( meranda@cis.ohio-state.edu )