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

Re: Same file open?

Posted by: tatewake <tatewake@...>

>I'd first like to thank those who replied to my previous questions. They
>gave me a solid start on my first _serious_ FB project.
>
>I've got a couple more questions, which are hopefully a bit simpler to
>answer. The first is, how does one determine if the file the user is
>trying to open is the same as one that is already open? That is, literally
>the same file, as opposed to an exact duplicate.

Compare the VolRefNum% of both files, as well as the filename$ itself.
Also, if you leave the file open, for instance, on handle #1, you can't
open it on handle #2; and you can possibly error trap for that. I don't
suggest this, but then _no_other_program_ can access that file.

-- Terence Jordan (tatewake@usa.net)
Inspired Software. inspired.netstreet.net/
Macintosh, Dos, Windows, and BeOS software solutions.
Phone: 407-728-7563
............................................
. New: Renegade Space Ninja for Macintosh! .
. Visit our page for more info. .
............................................