| CARVIEW |
Select Language
HTTP/2 301
server: nginx
date: Sat, 27 Dec 2025 16:16:22 GMT
content-type: text/html
content-length: 162
location: /api-reference/file-system-watcher/
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
strict-transport-security: max-age=31536000;
HTTP/2 200
server: nginx
date: Sat, 27 Dec 2025 16:16:22 GMT
content-type: text/html
last-modified: Tue, 26 Aug 2025 18:14:18 GMT
vary: Accept-Encoding
x-frame-options: SAMEORIGIN
x-content-type-options: nosniff
x-xss-protection: 1; mode=block
content-encoding: gzip
strict-transport-security: max-age=31536000;
FileSystemWatcher - Nova
RESULTS:
No Results
Building Extensions
Contributing Languages
JavaScript API Reference
FileSystemWatcher
Observe changes to files in the workspace
A FileSystemWatcher observes changes to the file system relative to the current workspace, and invokes callbacks when items are added, changed, or deleted.
File system watcher objects are created using the watch() method of the FileSystem class.
File system watcher objects conform to the Disposable interface, allowing all event listeners to be removed when the watcher is disposed.
Methods
onDidChange(callback)
Adds an event listener that invokes the provided callback when matching files are added, modified, or deleted from the filesystem. The callback will receive the path that was modified. Returns a Disposable object that can be used to cancel the event listener.