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

Document that directories are not watched recursively #16

Open
vadz opened this issue Oct 14, 2023 · 1 comment
Open

Document that directories are not watched recursively #16

vadz opened this issue Oct 14, 2023 · 1 comment

Comments

@vadz
Copy link
Contributor

vadz commented Oct 14, 2023

Thanks for a very useful extension, this is exactly what I was looking for to update the preview of the files I edit in the browser automatically. And it does seem to work great, but at least under Linux you have to specify the immediate parent directory of the file, which is not immediately obvious and cost me some time to discover.

So I think it would be great to mention this in the instructions about writing rules on the web site.

@nicorac
Copy link
Contributor

nicorac commented Oct 16, 2023

at least under Linux you have to specify the immediate parent directory

I've had a look at FileWatch sources:

On Windows the library uses ReadDirectoryChangesW(); setting its 4th parameter bWatchSubtree to true enables watching subtrees.

On Linux it uses inotify; its readme reports this "limitation":

Inotify monitoring of directories is not recursive: to monitor
subdirectories under a directory, additional watches must be
created. This can take a significant amount time for large
directory trees.

that's why it won't detect file changes in subdirectories (haven't tested it before, sorry 😔).

Other softwares are able to detect changes of (large) subtrees on Linux (i.e. VSCode, nodemon, ...), so I'll leave this issue open till I have the time to investigate it.

Feel free to contribute if you like. I'm open to switching to another multiplatform library if needed.

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

2 participants