import { Stats } from 'fs'; import { WorkspaceFolder } from 'vscode-languageserver-protocol'; import { URI } from 'vscode-uri'; export interface DirectoryToSearch { /** * The URI of the directory to search. * Example: 'file:///path/to/directory' */ directoryUri: URI; /** * The filters to apply to the search. * They form a logical AND, meaning * that a file must match all filters to be included in the results. */ filters?: { /** * The file name or extensions to filter by. * MUST be Unix-style paths. */ fileEndsWith?: string[]; }; } export type FileChangeHandler = (event: 'add' | 'change' | 'unlink', workspaceFolder: WorkspaceFolder, filePath: string, stats?: Stats) => void; export interface DirectoryWalker extends DefaultDirectoryWalker { } export declare const DirectoryWalker: import("@gitlab-org/di").InterfaceId; export declare class DefaultDirectoryWalker { /** * Returns a list of files in the specified directory that match the specified criteria. * The returned files will be the full paths to the files, they also will be in the form of URIs. * Example: [' file:///path/to/file.txt', 'file:///path/to/another/file.js'] */ findFilesForDirectory(_args: DirectoryToSearch): Promise; setupFileWatcherForWorkspace(workspaceFolder: WorkspaceFolder, changeHandler: FileChangeHandler): void; disposeWatcherForWorkspace(workspaceFolder: WorkspaceFolder): Promise; }