Reputation: 2483
Can any vscode extension detect if a folder has been added to the workspace?
That would be the file, add folder to workspace menu option.
Once the folder is added to the workspace, I want to use FileSystemWatcher
to watch for changes in the folder.
Upvotes: 2
Views: 552
Reputation: 65633
Try the vscode.workspace.onDidChangeWorkspaceFolders
event. It is fired with a WorkspaceFoldersChangeEvent with has the added and removed folders
Upvotes: 4