import { URI } from 'vscode-uri'; /** * FastDirectoryMatcher is used to efficiently match * directories against a set of URIs relative to a root. * * This is an internal class for the `GitIgnoreManager` and `RepositoryService class * at this time. * * The trie data structure allows for quick matching of directories * so that we can skip checking ignores for irrelevant directories. */ export declare class FastDirectoryMatcher { #private; constructor(); /** * Add a file URI to the matcher. * @param uri The URI to match against. * This will take the parent directory of the file (dirname) and add it to the matcher. * For example, if you pass in the following URIs: * - `file:///foo/bar/some_file.txt` * - `file:///foo/bar/src/nested_dir/other_file.txt` * * The matcher will match against: * - `file:///foo/bar/` * - `file:///foo/bar/src/nested_dir/` */ addFileToMatch(uri: URI): void; /** * Add a directory URI to the matcher. * @param directoryUri The URI to match against. * This will add the directory to the matcher. * For example, if you pass in the following URIs: * - `file:///foo/bar/` * - `file:///foo/bar/src/` * * The matcher will match against: * - `file:///foo/bar/` * - `file:///foo/bar/src/` */ addDirectoryToMatch(directoryUri: URI): void; /** * Find all matching directories for a given URI. * @param uri The URI to match against. * @returns An ordered list of URIs that match the given URI * relative to the class root, starting with the least specific match. */ findMatchingDirectories(uri: URI): URI[]; /** * Garbage collection should handle this, but for good measure * we'll clear the trie when the class is disposed. */ dispose(): void; }