import type { FsPath } from '../file-info/fs-path'; export declare abstract class Fs { abstract writeFile(filename: string, contents: string): void; abstract appendFile(filename: string, contents: string): void; abstract readFile(path: FsPath): string; abstract readDirectory(path: FsPath, filter?: 'none' | 'directory'): FsPath[]; abstract removeDir(path: FsPath): void; abstract createDir(path: string): void; abstract exists(path: string): path is FsPath; abstract tmpdir(): string; join: (...paths: string[]) => string; abstract cwd(): string; abstract findFiles(path: FsPath, filename: string): FsPath[]; abstract print(): void; /** * Used for finding the nearest `tsconfig.json`. It traverses through the * parent folder and includes the directory of the referenceFile. * @param referenceFile * @param filename */ abstract findNearestParentFile(referenceFile: FsPath, filename: string): FsPath; relativeTo(from: string, to: string): string; getParent(fileOrDirectory: FsPath): FsPath; pathSeparator: "\\" | "/"; /** * Reset the VirtualFs, has no effect on the real `DefaultFs`. */ abstract reset(): void; abstract split(path: string): string[]; abstract isAbsolute(path: string): boolean; abstract isFile(path: FsPath): boolean; }