Is there an implementation of something like autotest-fsevent for windows?

那年仲夏 提交于 2019-12-21 12:24:53

问题


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!


来源:https://stackoverflow.com/questions/2896062/is-there-an-implementation-of-something-like-autotest-fsevent-for-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!