Since then I found that providing an absolute path to fs.watch on Mac works if the path is outside (not a descendant of) the original current working directory for the process.
If the path is inside or equal to the original current working directory of the process, then providing an absolute path does not work (fs.watch returns no events for changes). In this case, providing the shortest possible relative path will work, or "." for the current working directory. Using process.chdir makes no difference, it's the original current working directory that is taken into account. Also, it seems like fs.watch on Mac on a directory always includes changes in subdirectories regardless of whether recursive is true or false. On Monday, September 8, 2014 9:13:23 AM UTC+2, Joran Dirk Greef wrote: > > I have been trying out fs.watch on Mac and noticed that providing a > relative path to fs.watch works, but providing an absolute path does not? > -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/8e896cb3-53ec-4853-b988-0c0bb325c8ed%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
