API: Allow to use the file watcher for aribitrary folders (#3025) (#139881)

* API: Allow to use the file watcher for aribitrary folders (#3025)

* fix tests

* update `createFileSystemWatcher` docs

* refuse to watch resources that are watched in workspace already

* properly check proposed API

* make it work via `createFileSystemWacher` (first cut)

* more docs

* cleanup

* enable recursive watching based on pattern

* add tests

* drop out-of-workspace events when using simple patterns

* do not apply excludes when watchig files

* log extension watch requests

* also log unwatch

* improved exclude handling

* more docs

* drop proposed api needs

* remove `suite.only`

* cannot watch inside workspace more than once

* do not send extension decriptor over

* adopt latest changes

* add `baseUri` to relative pattern

* backwards compat
This commit is contained in:
Benjamin Pasero
2022-01-13 13:32:03 +01:00
committed by GitHub
parent 0cfa366323
commit e3cf7e5e1b
13 changed files with 301 additions and 64 deletions

View File

@@ -1043,6 +1043,9 @@ export interface MainThreadFileSystemShape extends IDisposable {
$mkdir(resource: UriComponents): Promise<void>;
$delete(resource: UriComponents, opts: files.FileDeleteOptions): Promise<void>;
$watch(extensionId: string, session: number, resource: UriComponents, opts: files.IWatchOptions): void;
$unwatch(session: number): void;
$ensureActivation(scheme: string): Promise<void>;
}