Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!gatech!rutgers!att!pegasus!ech From: ech@pegasus.ATT.COM (Edward C Horvath) Newsgroups: comp.sys.mac.programmer Subject: Re: help Message-ID: <2776@pegasus.ATT.COM> Date: 11 Apr 89 19:30:07 GMT References: <11251@well.UUCP> Organization: AT&T ISL Middletown NJ USA Lines: 22 From article <11251@well.UUCP>, by svc@well.UUCP (Leonard Rosenthol): > In article <3369@nunki.usc.edu>, anthonyt@castor.usc.edu (Anthony Tieu) writes: >> I am writing an init to keep users from writing on to the hard disk. >> I would like to know how to detect and obtain the last file or folder >> that was created, so I can delete it. Any comments is welcome.. >> > It seems to me that is the DEFINATELY the wrong approch to the problem! > If I were doing this (which I am not, thank god) I would simply patch _Open > and _Create so that if a appl tries to open a file it is returned ReadOnly and > _Create always returns an error so no files are created. You might be careful > with these as this would mean that NOTHING could write to the disk (including > the OS, Inits, DA's ,etc.) Would that it were that simple! You also have to trap PBCatMove, PBSetCatInfo, PBSetFInfo, and most of the rest of the FileMgr calls. Of course, any app that needs a temp file will fail to run, maybe gracefully, maybe not. WHY ARE YOU TRYING TO DO THIS??!?!?! =Ned Horvath=