![]() ![]() Note that file events from recursive file watchers may be excluded based on user configuration. If possible, keep the use of recursive watchers to a minimum because recursive file watching is quite resource intense. git folder), then you can use a non-recursive watcher in the workspace for this purpose.īut the createFileSystemWatcher docs do warn its users to try to minimize usage: If you need to watch in a location that is typically excluded (for example node_modules or. Non-recursive file watchers however are always supported, even inside the opened workspace because they allow to bypass the configured settings for excludes ( files.watcherExclude). ![]() Note that requests for recursive file watchers for a base path that is inside the opened workspace are ignored given all opened workspace folders are watched for file changes recursively by default. VS Code and extensions that use the VS Code API can override your files.watcherExclude settings where they deem fit. only changes to the first level of the path will be reported). contains ** or path segments), the path will be watched recursively and otherwise will be watched non-recursively (i.e. See this section of the createFileSystemWatcher docs:Īdditional paths can be added for file watching by providing a RelativePattern with a base path to watch. I tried to add the " *" pattern in the files.watcherExclude to stop filewatcher, but I have no clue whether it's actually working or not. How else would VS Code implement things like its Explorer view? (which updates itself when files and directories are added, removed, renamed, moved, etc.)Īs for extensions that use this API to do things like providing Intellisense, how else would they know when you've created, edited, or deleted files in the programming/markup language they support, in order to hook that info into the rest of the software they use to provide their IntelliSense functionality? The VS Code API docs for the createFileSystemWatcher workspace function are much elaborated:Ĭreates a file system watcher that is notified on file events (create, change, delete) depending on the parameters provided.īy default, all opened workspace folders will be watched for file changes recursively. Which should answer your question for what file watchers do. The VS Code API docs for the FileSystemWatcher interface states:Ī file system watcher notifies about changes to files and folders on disk or from other FileSystemProviders. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |