[EMAIL PROTECTED] wrote:

> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 02, 1999 6:51 AM
> Subject: [REBOL] How to open a file exclusively?
>
> > Hi,
> >
> > is there any possibility to open file exclusively (lock it) in REBOL? It
> > doesn't seem any refinement can do it. Maybe some open/exclusive
> > refinement wouldn't be so hard to add? It would be usefull for file
> > based semaphores ....
>
> Can you set that file hidden, so the other apps can't even see it? Or check
> the archive setting? Or change the extension or the name? Or set it
> read-only? Dos is limited in this stuff.
>
> The following is NOT code, obviously:
> 1) i want file test.txt
> 2a) change it's name to test_inuse_by_code1.txt
> 2b) if the app is #2, it's test_inuse_by_code2.txt
> 2c) or set the other semaphores as bit tests in the name: test_bits.txt
> 2d) or a separate file of attributes, test_atts.txt contains them.
> 3) use the file
> 4) change the name back when done.

But I think it doesn't solve one problem for me. I need to know, if app is
still running. If some app crashes, it will let file in unwanted state (e.g.
renamed), so I would like to check, if it is possible to open it, to see
appropriate app still holds the lock to it ...

-pekr-

>
>
> Kat

Reply via email to