From: CT Date: 2005-02-14T17:49:35+09:00 Subject: Re: [ANN] win32-changejournal 0.1.0 Okay, so I finally got around to trying this out. Sorry about the delay. I'm facing some problems. Code: ---------------->8------------------------------- require 'win32/changenotify' require 'win32/changejournal' include Win32 watch_path = 'C:\Some\Long\Path\\' #watch = ChangeNotify.new(watch_path,true,ChangeNotify::LAST_WRITE) watch = ChangeJournal.new(watch_path) puts "Starting watch.." watch.wait do|info| puts "Change Detected:" puts "File:#{info.file_name}" puts "Action:#{ info.action}" $stdout.flush end while true ------------------------8<----------------------- Firstly, if there is something really bad I'm doing in this code, do point it out. What I'm observing is this: With ChangeJournal, when I run this, I get notifications for changes of files that are NOT under the specified directory. Another problem is that it takes around ten seconds(or more sometimes) for it to start noticing changes, especially if I Ctrl+C a running instance of the program and start it again. Stuff works as expected with ChangeNotify. I'm on WinXP Professional. ruby -v gives ruby 1.8.2 (2004-11-06) [i386-mswin32] Thanks CT