rs4u+@ANDREW.CMU.EDU (Richard Siegel) (07/29/87)
I'm working on an application that handles multiple data and resource files, as documents. In order for my Revert function to work safely, I have to somehow lock the files while they're open so that they can't get moved; if a file gets moved between the time that it's opened and the time that Revert is called, havoc can result. As it is now, I open the file (with FSOpen and OpenResFile), read whatever information I need (with FSRead and GetResource), and then close the file (with FSClose and CloseResFile). I need also to prevent a file from being opened twice, is there a way to do this? Simply leaving it open doesn't seem to work, and I definitely don't want to try to close the same access path twice -- doing so can have horrible consequences... Notice that the same considerations apply to an application that's runnning under Juggler... Any help would be appreciated. --Rich