On Feb 21, 3:10 am, Mark Volkmann <[email protected]> wrote:
> The docs for the watch function in the fs module contain this:
>
> "*Warning:* Providing filename argument in the callback is not
> supported on every platform (currently it's only supported on Linux
> and Windows). Even on supported platforms filename is not always
> guaranteed to be provided. Therefore, don't assume that filename
> argument is always provided in the callback, and have some fallback
> logic if it is null."
>
> Is there a fundamental problem with Mac OS X that will prevent this
> from ever working there or is there hope that this will be fixed
> eventually?

Yes - the kernel doesn't tell us the filename. It won't be "fixed",
unless future versions of Mac OS add kernel functionality to support
this.

> It's seems like the primary reason to use this function is to watch
> for changes in a directory. If the name of files that are changed
> can't be determined then it's hard to see how this function is useful.

Well, it could give you a hint that you have to do a readdir() to
figure out what changed. If it's not useful in your specific case,
you'll have to find another solution.

- Bert

-- 
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

Reply via email to