We need a Visual Studio Code extension that monitors a specific folder on the file system, and when the contents of the folder change, it should trigger some action.
Can an extension do that?
I suppose we need a Task. However, all the examples on tasks I have found deal with triggers from inside VSCode (mostly edits by the user).
I have not found any examples on background tasks that are triggered by an external event source like a network or a file system.
FileSystemWatcher
andFileSystemProvider
. – DonelaFileSystemWatcher
only for files within the currently opened solution? AndFileSystemProvider
seems to be an interface that I need to implement if I want my own file system. – Bornitevscode.workspace.createFileSystemWatcher(...)
, but that seems to be about files within the currently opened workspace or folder. I need to watch the file system outside of the workspace. – Bornitefs.watch
. Can I use NodeJS directly in VSCode background tasks? – Bornite