On Sat, Feb 25, 2012 at 03:18, Mark Volkmann <[email protected]> wrote: > I want to confirm the behavior I'm seeing from calling fs.watch on a > directory. > I get notified when files in the directory are created, deleted, or > have their content modified (mtime and ctime). > I do not get notified when files are merely accessed (atime), when > their owner changes (ctime), or when their permissions change (ctime). > I'm running on Mac OS X Lion. > > Is this what I should expect? > > Should I expect the same behavior on Linux and Windows?
No. fs.watch() on OS X and the BSDs is backed by the kqueue event mechanism. It has a couple of known shortcomings, lack of *time updates being one of them. Linux and Windows use the inotify and ReadDirectoryChangesW interfaces respectively, which are both more robust mechanisms. Use fs.watchFile() (not supported on Windows) if you want consistent behavior across Unices. It's not nearly as efficient as fs.watch(), though. -- 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
