A class for monitoring events related to files and directories. This
package is deprecated in favor of win32-changejournal on NTFS filesystems.
gem install win32-changenotify
filter = ChangeNotify::FILE_NAME | ChangeNotify::DIR_NAME
path = 'C:\some\path'
cn = ChangeNotify.new(path, true, filter)
ChangeNotify.new(path, true, filter) do |events|
The Win32::ChangeNotify class is a subclass of Win32::Ipc, and thus has
all of its methods available as well.
This library is deprecated in favor of win32-changejournal on NTFS
Despite the improvements yielded as a result of using completion ports,
it's still possible that events could be missed. To be more precise,
any events that occur in the fraction of a second between the call to
GetQueuedCompletionStatus() and ReadDirectoryChangesW() in the wait loop
will not get picked up. As a general rule, the faster your system is,
the less likely you are to encounter this scenario.
With Ruby 2.x and JRuby this should be even less of an issue than it's
been in the past.
This class was originally based on the Win32::ChangeNotify Perl module by
Probably none. This library is deprecated in favor of win32-changejournal.
However, that library only works on NTFS filesystems, so this library will
be maintained as well.
That being said, I'm always open to improvements, so feel free to submit
ideas and patches.
None that I know of. Please report any issues on the project page at:
(C) 2003-2013 Daniel J. Berger, All Rights Reserved
This package is provided "as is" and without any express or
implied warranties, including, without limitation, the implied
warranties of merchantability and fitness for a particular purpose.
Daniel J. Berger