[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Is this file locked?

emarkp

11/10/2007 4:39:00 AM

Is there an easy ruby way to tell if a file is locked? I can lock a
file using File.flock, but I have a file which may have a shared lock
and I don't want to mess with it unless no one else is locking it (and
grabbing an exclusive lock screws up the program that's creating the
file).

I'm on WinXP, so a solution using WIN32API would be acceptable.
--
Mark Ping
emarkp@soda.CSUA.Berkeley.EDU