bpms_site/.svn/pristine/4a/4a6b9cd8e48923ce8d0524daf892784bf1771423.svn-base
2025-11-02 16:38:49 +03:30

31 lines
1.3 KiB
Plaintext

import type { FileReader } from './file-reader';
import { RecursiveReadDirOptions } from '../../../../../../lib/recursive-readdir';
export type DefaultFileReaderOptions = Pick<RecursiveReadDirOptions, 'pathnameFilter' | 'ignoreFilter' | 'ignorePartFilter'>;
/**
* Reads all the files in the directory and its subdirectories following any
* symbolic links.
*/
export declare class DefaultFileReader implements FileReader {
/**
* Filter to ignore files with absolute pathnames. If undefined, no files are
* ignored.
*/
private readonly options;
/**
* Creates a new file reader.
*
* @param pathnameFilter filter to ignore files with absolute pathnames, false to ignore
* @param ignoreFilter filter to ignore files and directories with absolute pathnames, false to ignore
* @param ignorePartFilter filter to ignore files and directories with the pathname part, false to ignore
*/
constructor(options: Readonly<DefaultFileReaderOptions>);
/**
* Reads all the files in the directory and its subdirectories following any
* symbolic links.
*
* @param dir the directory to read
* @returns a promise that resolves to the list of files
*/
read(dir: string): Promise<ReadonlyArray<string>>;
}