@rushstack/heft
Version:
Build all your JavaScript projects the same way: A way that works.
43 lines • 1.73 kB
TypeScript
import type { FileSystemAdapter } from 'fast-glob';
/**
* A filesystem adapter for use with the "fast-glob" package. This adapter uses a static set of paths
* to provide a virtual filesystem.
*
* @remarks This adapter only implements methods required to allow for globbing. This means that it
* does not support returning true-to-disk file stats or dirent objects. Instead, the returned file
* stats and dirent objects only implement the `isDirectory` and `isFile` methods, which are
* required for filesystem traversal performed by the globber.
*/
export declare class StaticFileSystemAdapter implements FileSystemAdapter {
private _directoryMap;
/** { @inheritdoc fs.lstat } */
lstat: FileSystemAdapter['lstat'];
/** { @inheritdoc fs.lstatSync } */
lstatSync: FileSystemAdapter['lstatSync'];
/** { @inheritdoc fs.stat } */
stat: FileSystemAdapter['stat'];
/** { @inheritdoc fs.statSync } */
statSync: FileSystemAdapter['statSync'];
/** { @inheritdoc fs.readdir } */
readdir: FileSystemAdapter['readdir'];
/** { @inheritdoc fs.readdirSync } */
readdirSync: FileSystemAdapter['readdirSync'];
/**
* Create a new StaticFileSystemAdapter instance with the provided file paths.
*/
constructor(filePaths?: Iterable<string>);
/**
* Add a file and it's parent directories to the static virtual filesystem.
*/
addFile(filePath: string): void;
/**
* Remove a file from the static virtual filesystem.
*/
removeFile(filePath: string): void;
/**
* Remove all files from the static virtual filesystem.
*/
removeAllFiles(): void;
private _normalizePath;
}
//# sourceMappingURL=StaticFileSystemAdapter.d.ts.map