-
Notifications
You must be signed in to change notification settings - Fork 44
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
A few feature requests #58
Comments
Hi @POPCORNS1068, The last two features actually are more likely based on the first one. But I'm concerned about the efficiency of scanning when the directory is too deep. It did that in earlier versions of node-watch (<=0.3.x) and it's hard to go back now. Anyway, PRs are welcome and I'd love to add the |
Maybe make them optional like the |
Oops that was unintentional |
That may be huge work :D |
For the initial scan, I used this snippet here (modified to create a tree instead of a list): https://stackoverflow.com/questions/5827612/node-js-fs-readdir-recursive-directory-search. I made it add the found dirs/files to a tree and keep it updated with the change events (add updated dir/file into tree if it's not already in it, remove if it's removed) As for the last one, since I already have a tree of files, when a remove event occurs for a directory, I remove (and report) that dir and it's contents in that tree, recursively. I'm not that into js so that's I could come up with. |
I'm going to leave it open to see if anyone upvote for this. |
"Initial Scan" would be great feature! |
I am also switching from
|
I would very much like to see the points in the first post addressed, especially the third one would be a deal breaker for me, if a file is deleted and I don't get an event about that file I'd consider it a bug even. |
I wanted to submit a PR with those missing features, but I ended up rewriting the whole thing, now it should do pretty much everything except for supporting symlinks, I'll leave a link to it here in case somebody here is interested: https://www.npmjs.com/package/watcher |
I've been considering switching over from chokidar to this due to a few issues, and having 0 dependencies is actually somewhat appealing to me.
But I'm missing a few features:
Currently I have a few dirty workarounds for some of the things above, but it'd be nice if node-watch can have these built-in.
The text was updated successfully, but these errors were encountered: