Forum Navigation
You need to log in to create posts and topics.

Re: Closing Data & Resource Files

Posted by: microcsm <microcsm@...>

MAWRPh@aol.com wrote:

>I am working on an application that uses one file containing both a data and
>resource fork. I open both forks when the app starts and close them both when
>the app quits.
>
>I have noticed that many(most/all?) of the examples show opening the data
>fork, reading & writing to/from it and then closing it. Is there a problem
>with opening it and leaving it open if you know that you will be continually
>accessing it when the app is open? Can you do the same with the resource
>fork?

Yes, you can. The only setback that I can think of is that if another
program needs the file, it won't have access to it during that time.
Just be sure you close it _before_ your program terminates. It's not
nice to leave a file open after quitting. 😉

========================================
| David Blache - Developer |
========================================
| Staz Software, Inc - Stazologist |
| (tech@stazsoftware.com) |
| Microcosm Software, Inc. - Owner |
| (microcsm@goldinc.com) |
========================================