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

精读《如何利用 Nodejs 监听文件夹》 #87

Closed
ascoders opened this issue May 30, 2018 · 3 comments
Closed

精读《如何利用 Nodejs 监听文件夹》 #87

ascoders opened this issue May 30, 2018 · 3 comments

Comments

@ascoders
Copy link
Owner

精读文章:how-to-watch-for-files-changes-in-node-js

一般监听目录变化,我们都会使用 chokidar watch 等库,这篇文章介绍了监听目录的实现细节与注意点,值得学习一下。

@ascoders ascoders mentioned this issue May 30, 2018
65 tasks
@ascoders ascoders closed this as completed Jun 4, 2018
@wzjsun
Copy link

wzjsun commented Sep 19, 2018

你好,watch是不是不能监听软连接啊,如果可以,怎么监听呢

@xiaozxz
Copy link

xiaozxz commented Oct 22, 2018

我是用supervisor这样在开发的时候有改变,文件也能够及时更新

@ascoders
Copy link
Owner Author

@wzjsun 可以参考这段代码:https://github.com/paulmillr/chokidar/blob/master/lib/nodefs-handler.js#L294
应该是直接监听软连接指向的文件路径。

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

No branches or pull requests

3 participants