src/vs/workbench/api/common/extHostWorkspace.ts/ExtHostWorkspace/findFiles
class ExtHostWorkspace:	findFiles(include: vscode.GlobPattern | undefined, exclude: vscode.GlobPattern | null | undefined, maxResults: number | undefined, extensionId: ExtensionIdentifier, token: vscode.CancellationToken = CancellationToken.None): Promise<vscode.Uri[]> {
		this._logService.trace(`extHostWorkspace#findFiles: fileSearch, extension: ${extensionId.value}, entryPoint: findFiles`);

		let excludePatternOrDisregardExcludes: string | false | undefined = undefined;
		if (exclude === null) {
			excludePatternOrDisregardExcludes = false;
		} else if (exclude) {
			if (typeof exclude === 'string') {
				excludePatternOrDisregardExcludes = exclude;
			} else {
				excludePatternOrDisregardExcludes = exclude.pattern;
			}
		}

		if (token && token.isCancellationRequested) {
			return Promise.resolve([]);
		}

		const { includePattern, folder } = parseSearchInclude(GlobPattern.from(include));
		return this._proxy.$startFileSearch(
			withUndefinedAsNull(includePattern),
			withUndefinedAsNull(folder),
			withUndefinedAsNull(excludePatternOrDisregardExcludes),
			withUndefinedAsNull(maxResults),
			token
		)
			.then(data => Array.isArray(data) ? data.map(d => URI.revive(d)) : []);
	}