import { URI } from 'vscode-uri'; /** * GitIgnoreManager aims to be a spec compliant gitignore manager. * It uses the ignore package to match the file against gitignore patterns. * It also checks the .gitignore/exclude file in the root of the git repository. * * A majority of this logic has been adapted from https://github.com/isomorphic-git/isomorphic-git * * We opted for using our own implementation for both speed and flexibility. * * This class is stateful: it maintains an internal state of the gitignore * files that have been added to the manager. Be sure to update the manager * as gitignore files are added, updated, or removed. * */ export declare class GitIgnoreManager { #private; /** * Create a new GitIgnoreManager. * * @param rootUri The root URI of the git repository. * @param excludeFileContent (optional) The content of the exclude file in the root of the git repository. */ constructor(rootUri: URI); /** * Add a top level exclude file to the manager. * This is typically located at .git/info/exclude. */ addExcludeFile(content: string): void; /** * Add a gitignore file to the manager. * This will add the gitignore file to the ignore map and parse the patterns. */ addGitignore(uri: URI, content: string): void; /** * Check if the given file URI is ignored by git. * This will match the file against gitignore patterns in the directory structure * and all its parent directories. * * This also checks the .gitignore/exclude file in the root of the git repository. */ isIgnored(filepath: URI): boolean; dispose(): void; }