-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for fs.watchFile() #654
Comments
@humphd Can I try tackling this issue for release 0.3? |
@andrewkoung sure, that's fine with me. Do you want to do a bit of reading/studying on your own, and then ask any questions you have in here? I'm happy to mentor you on the work. |
I'm going to try studying it first and see what I can figure out and then ask here. Thanks! |
OK, sounds good. If/when you have questions, feel free to ask them here. Happy to help. |
@humphd I did some looking around and the difference between watch() and watchFile() seems to be that watchFile calls stat periodically. Is there a class in this project that has functions to perform stat checking? |
Right, I'm not sure what I think about polling in Filer. On the one hand, it makes things pretty lightweight in terms of code; but since we already have infrastructure in place for doing watch events with @modeswitch what are your thoughts here? @andrewkoung while we figure out which way you should go, why don't you start by writing tests for this? |
@humphd No problem about the tests! On the other hand, I've been doing some extreme deep diving these past few days and this is what I have so far... am I heading in the right direction?
|
@andrewkoung thanks for the update. Here are a few thoughts, reading your code above:
If you want to open a PR when you do that, I can start commenting directly in the code to help you more. |
Ok thanks! I'll give it a try! |
https://nodejs.org/api/fs.html#fs_fs_watchfile_filename_options_listener
See also #553 for adding
fs.unwatchFile()
The text was updated successfully, but these errors were encountered: