Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!ogicse!pdxgate!pdxgate.cs.pdx.edu!cfry From: cfry@jove.cs.pdx.edu (Chall Fry) Newsgroups: comp.sys.mac.system Subject: Re: how to lock file names Message-ID: Date: 19 Feb 91 15:25:41 GMT References: <1991Feb18.164429.16489@zeus.mgmt.purdue.edu> Sender: news@pdxgate.UUCP Distribution: comp.sys.mac.system Organization: Portland State University, CS Dept. Lines: 44 In-reply-to: delac@midas.mgmt.purdue.edu's message of 18 Feb 91 16:44:29 GMT In article <1991Feb18.164429.16489@zeus.mgmt.purdue.edu> delac@midas.mgmt.purdue.edu (Chas. DeLa) writes: [Quotes earlier stuff about setting the System bit to lock a file's name] >I tried this out (used ResEdit to change the "System" check box to "on" in >ResEdit Get Info), but was able to change the name afterwards even though >I'd saved the ResEdit changes. What gives? >I'd like to be able to do this, but unless I had brain-lock, the proposed >solution didn't produce the desired effect. Also, is there a way to >prevent a file from being deleted which doesn't use the file level Get >Info lock box? Sorta from memory, so correct me if I'm wrong ... When you open a folder in the Finder, the File Info record (containing the flags and such) is brought into memory. Changing the info in ResEdit doesn't update the Finder's memory-resident copy until you close and re-open the window. At this point the name should be unchangeable. There are a couple of ways to keep files from getting deleted which are more secure than locking them. The invisible bit (settable in ResEdit) is good, as you can't delete files you can't see. (they'll still show up in SFxxxFile dialogs, however, and in utilities such as DiskTop). There's also the File Protect bit, which absolutely keeps a file from being deleted by any program not specifically designed to deal with it, and ResEdit (for reasons I don't really understand**) won't let you set/unset this bit. Some programs, such as DiskTop and DiskTools II (there's also something on Sumex) allow you to set this bit. Apple might have something to say about the using the Protect bit, but I can't find in IM or in a glance at the TechNote index, so buyer beware. **ResEdit seems to have turned off a few of the checkboxes in the File Info dialog. I checked the DITL, and the items are enabled, but they won't change state wihen clicked upon. Are the FInfo boxes covered in a TMPL? (they're not exactly a resource ...) If not, [how] can you enable the protect (and busy, I suppose) options? Patching a CODE somewheres? Or do you just use some modifier combo? Or, are the boxes really 'display only.' Ack. --Chall Fry cfry@jove.cs.pdx.edu "Chall, 'nifty' I can deal with, but 'goshums' is just too much." -Anastasia