Test if a file is locked by the OS

Daniel Mynyk <[email protected]> Wed, 29 Dec 2004 13:36:09 -0600
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Is there a way in Ruby to test if a file is locked by the OS? I am 
trying to write a program that runs periodically and merges and copies 
certain files from a work folder into another folder. In this work 
folder, a separate application (not in Ruby) can be creating or 
appending to files. This Ruby program needs to merge and copy only those 
files that are not currently open by another application. The OS is a 
Windows NT-based system if there is no OS-independent way to do this in 
Ruby.

-- 
Daniel Mynyk
Information Technology
Desktop Programmer
Ext. 2791