Node.js のファイル監視の API には fs.watch() と fs.watchFile() の 2 つがある。 微妙に機能がかぶっているし、使い分けが分かりにくかったので調べてみた。 公式情報を見る まずは公式のドキュメント (v0.8.0)を見てみた。 fs.watchFile(filename, [options], listener) Stability: 2 - Unstable. Use fs.watch instead, if available. Watch for changes on filename. fs.watch(filename, [options], [listener]) Stability: 2 - Unstable. Not available on all platforms. Watch for changes on filename,
![Node.js の fs.watch() と fs.watchFile() の違い](https://cdn-ak-scissors.b.st-hatena.com/image/square/95abde13f7ed41248843e654a2f2ddcde8983db4/height=288;version=1;width=512/http%3A%2F%2Ftech.nitoyon.com%2Fapple-touch-icon-114x114.png)