Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createFileSystemWatcher(globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): lang.FileSystemWatcher {
const disposables = new DisposableCollection();
const onDidCreateEmitter = new lang.Emitter();
disposables.push(onDidCreateEmitter);
const onDidChangeEmitter = new lang.Emitter();
disposables.push(onDidChangeEmitter);
const onDidDeleteEmitter = new lang.Emitter();
disposables.push(onDidDeleteEmitter);
disposables.push(this.fileSystemWatcher.onFilesChanged(changes => {
for (const change of changes) {
const fileChangeType = change.type;
if (ignoreCreateEvents === true && fileChangeType === FileChangeType.ADDED) {
continue;
}
if (ignoreChangeEvents === true && fileChangeType === FileChangeType.UPDATED) {
continue;
}
if (ignoreDeleteEvents === true && fileChangeType === FileChangeType.DELETED) {
continue;
createFileSystemWatcher(globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): lang.FileSystemWatcher {
const disposables = new DisposableCollection();
const onDidCreateEmitter = new lang.Emitter();
disposables.push(onDidCreateEmitter);
const onDidChangeEmitter = new lang.Emitter();
disposables.push(onDidChangeEmitter);
const onDidDeleteEmitter = new lang.Emitter();
disposables.push(onDidDeleteEmitter);
disposables.push(this.fileSystemWatcher.onFilesChanged(changes => {
for (const change of changes) {
const fileChangeType = change.type;
if (ignoreCreateEvents === true && fileChangeType === FileChangeType.ADDED) {
continue;
}
if (ignoreChangeEvents === true && fileChangeType === FileChangeType.UPDATED) {
continue;
}
if (ignoreDeleteEvents === true && fileChangeType === FileChangeType.DELETED) {
continue;
}
const uri = change.uri.toString();
createFileSystemWatcher(globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): lang.FileSystemWatcher {
const disposables = new DisposableCollection();
const onDidCreateEmitter = new lang.Emitter();
disposables.push(onDidCreateEmitter);
const onDidChangeEmitter = new lang.Emitter();
disposables.push(onDidChangeEmitter);
const onDidDeleteEmitter = new lang.Emitter();
disposables.push(onDidDeleteEmitter);
disposables.push(this.fileSystemWatcher.onFilesChanged(changes => {
for (const change of changes) {
const fileChangeType = change.type;
if (ignoreCreateEvents === true && fileChangeType === FileChangeType.ADDED) {
continue;
}
if (ignoreChangeEvents === true && fileChangeType === FileChangeType.UPDATED) {
continue;
}
if (ignoreDeleteEvents === true && fileChangeType === FileChangeType.DELETED) {
continue;
}
const uri = change.uri.toString();
const codeUri = change.uri['codeUri'];
if (testGlob(globPattern, uri)) {