Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: Is this file open? Keywords: File Manager SFGetFile HELP Message-ID: <9902@goofy.Apple.COM> Date: 23 Aug 90 15:50:24 GMT References: <1627@uvm-gen.UUCP> Distribution: usa Organization: Apple Computer Inc., Cupertino, CA Lines: 29 In article <1627@uvm-gen.UUCP> root@griffin.uvm.edu (Charles Root) writes: >Is there a way to tell if a file returned from SFGetFile is already open? Yes, call either PBGetFInfo or PBHGetFInfo and then check out the ioFlAttrib field. The relevant bits in this byte are as follows: bit meaning 2 set if the resource fork is open 3 set if the data fork is open 7 set if either fork is open This is described in detail in Inside Mac volume 4, File Manager chapter. If you don't want to deal with open files at all, you can do this check in a file filter (that you pass a pointer to SFGetFile). That way, open files won't even show up in the list... steve -- ____________________________________________________________________ Steve Christensen Internet: stevec@goofy.apple.com Apple Computer, Inc. AppleLink: STEVEC 20525 Mariani Ave, MS 81-CS CompuServe: 76174,1712 Cupertino, CA 95014 "You just contradicted me." "No I didn't." ____________________________________________________________________