Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!hplabs!well!wdh From: wdh@well.sf.ca.us (Bill Hofmann) Newsgroups: comp.sys.mac.programmer Subject: Re: Need sample code for folder/file lookup. Keywords: blessed folder Message-ID: <18759@well.sf.ca.us> Date: 27 Jun 90 16:36:09 GMT References: <460@tci.UUCP> <13507@unix.SRI.COM> Distribution: comp Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 15 In article <460@tci.UUCP> mitchell@tci.UUCP (Rob Mitchell) writes: >Hey fellow Mac'ers, > > Could someone share a quick and easy way of finding out if >the System folder (blessed) exists on a volume or not? And also if >a preference-like file exists inside the System file? If it's the system folder of the current boot volume, why not use SysEnvirons? One of the fields is sysVRefNum. I'm not sure why you'd want to put a prefs file in a system folder on a non-boot drive, so I think this'll solve it for you. Then, try to create your pref file, if it exists (that is, you get an "already exists" error), open it, otherwise, open and init it. -Bill Hofmann