Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site wang.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!wanginst!wang!ephraim From: ephraim@wang.UUCP (pri=8 Ephraim Vishniac x76659 ms1459) Newsgroups: net.micro.mac Subject: Checking for volume busy? Message-ID: <784@wang.UUCP> Date: Mon, 31-Mar-86 08:34:06 EST Article-I.D.: wang.784 Posted: Mon Mar 31 08:34:06 1986 Date-Received: Sat, 5-Apr-86 03:17:14 EST Distribution: net Organization: Wang Labs, Lowell MA Lines: 17 While trying to write a passably safe disk formatting program, I wanted to check whether the target volume was busy (had open files). In both the hardcover IM and the 12/85 supplement, the File Manager chapter says that bit 6 of vcbAtrb will be set if the volume is busy. In fact, it's set whether the volume is busy or not. It's even set in the on-disk copy of the attribute bytes. I was tempted to use _GetFCBInfo (tersely described in the 12/85 supplement), but it's listed in the MDS equates as an HFS-only call. So, I wound up traversing the FCB list myself. This doesn't give me warm feelings, even though I check fsFCBLen and vary the FCB size for MFS versus HFS. I'm not convinced, for example, that it would warn me about files open inside HFS subdirectories (folders). Does anyone know a more reliable way to determine whether a volume is busy? Thanks, Ephraim decvax!wanginst!wang!ephraim