Skip to content
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

New files aren't watched #8

Closed
paton opened this issue Sep 8, 2014 · 2 comments · Fixed by #9
Closed

New files aren't watched #8

paton opened this issue Sep 8, 2014 · 2 comments · Fixed by #9

Comments

@paton
Copy link
Contributor

paton commented Sep 8, 2014

Creating a new file in a watched directory necessitates restarting the server so that the new file is watched.

It would be nice if new files were detected and registered with fs.watchFile automatically.

@nicjansma any thoughts on this? I'll try to see if there's an easy solution later today.

@nicjansma
Copy link
Owner

Maybe we should switch to something like https://github.com/mikeal/watch

It looks like it uses .watchFile() internally for all files and directories, monitoring new files if they're added. In addition, it also is monitoring .mtime on the file so it won't fire the changed event on simple accesses/reads (which .watchFile() will).

@paton
Copy link
Contributor Author

paton commented Sep 8, 2014

Nice find! That might be the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants