[comp.sys.mac.programmer] A couple of questions

lefty@twg.com (David N. Schlesinger) (07/07/90)

In article <8799@goofy.Apple.COM> stevec@Apple.COM (Steve Christensen) 
writes:
> In article <26801@bcsaic.UUCP> lbaum@bcsaic.UUCP (Larry Baum) writes:
> >How can I determine if the file is alreadfy open, before I call
> >OpenResFile?
> 
> Call GetFileInfo and see if bit 7 of the ioFlAttrib field is set.  I can't
> remember if it makes a distinction between the resource and data forks or
> if that bit is set when either fork is open.

Specifically, if the resource fork of the file is open, bit 2 of 
ioFlAttrib will be set; if the data fork is open, bit 3 will be set.  If 
either fork is open, bit 7 of ioFlAttrib will be set and ioFRefNum will be 
non-zero.

Lefty

|<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>|
|           David N. Schlesinger   ||   "When I have nothing to say,       |
|           The Wollongong Group   ||    my lips are sealed;               |
| Internet: Lefty@twg.com          ||    say something once,               |
| POTS:     415/962-7219           ||    why say it again?" -- David Byrne |
|<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>|