The Trevor Burnham's Watchit <https://github.com/TrevorBurnham/Watchit>module does an okay job of providing a "sensible wrapper" around fs.watch -- it smooths out some of the cross-platform issues. It certainly doesn't solve every problem (for example, in my module<https://github.com/adam-p/text-file-follower>that uses Watchit, I've had to disable some of my tests that perma-fail on Linux), but, depending on your needs, it might be good enough.
On Sunday, March 4, 2012 2:03:51 AM UTC-5, Isaac Schlueter wrote: > > File watching is a dirty business across platforms. > > This API needs some work. Documentation and API proposals are > welcome, but be aware that the underlying systems are very different, > so bridging the gap is tricky. > > On Sat, Mar 3, 2012 at 15:38, Phoscur <[email protected]> wrote: > > Also nodejs docs lack information about this function not beeing > > implemented on windows > > > http://nodejs.org/docs/latest/api/fs.html#fs_fs_watchfile_filename_options_listener > > > > Found this issue, which is exactly my case too: > > https://github.com/cowboy/grunt/pull/34 > > > > Do you get any messages under linux when you use fs.watchFile? Maybe it > > should be marked as deprecated. > > > > Am 03.03.2012 22:16, schrieb Phoscur: > >> This is not uncommon when you try to use watch functionality of some > >> module on windows. > >> Is there a simple workaround to get this without patching the module? I > >> mean fs.watch works fine on windows, but apparently the old linux > >> notation is not supported. > >> > > > > -- > > Job Board: http://jobs.nodejs.org/ > > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > > You received this message because you are subscribed to the Google > > Groups "nodejs" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > > http://groups.google.com/group/nodejs?hl=en?hl=en > > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
