Is this file locked?

E

E. Mark Ping

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top