Basically it's an extension for autotest that listens for notification from OS and allows autotest not to scan for file changes permanently while testing only necessary changes. It saves CPU and disk use.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Windows provides an API for File Change Notification called FindFirstChangeNotification http://msdn.microsoft.com/en-us/library/aa365261(VS.85).aspx
It turns out that somebody already made a small ruby-bridge for this you might use for a starting point: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/36807
回答2:
There is rb-fchange for Guard.
回答3:
I tried several and in Vista wdm worked best for me.
require 'wdm' monitor = WDM::Monitor.new monitor.watch_recursively('c:\test') { |change| puts change.path } monitor.run!