Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/platform/files/node/watcher/nodejs/nodejsClient.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { DisposableStore } from '../../../../../base/common/lifecycle.js';
7
import { IFileChange } from '../../../common/files.js';
8
import { ILogMessage, AbstractNonRecursiveWatcherClient, INonRecursiveWatcher } from '../../../common/watcher.js';
9
import { NodeJSWatcher } from './nodejsWatcher.js';
10
11
export class NodeJSWatcherClient extends AbstractNonRecursiveWatcherClient {
12
13
constructor(
14
onFileChanges: (changes: IFileChange[]) => void,
15
onLogMessage: (msg: ILogMessage) => void,
16
verboseLogging: boolean
17
) {
18
super(onFileChanges, onLogMessage, verboseLogging);
19
20
this.init();
21
}
22
23
protected override createWatcher(disposables: DisposableStore): INonRecursiveWatcher {
24
return disposables.add(new NodeJSWatcher(undefined /* no recursive watching support here */)) satisfies INonRecursiveWatcher;
25
}
26
}
27
28