import { System } from './system'; export declare enum SystemExtraErrorName { SYSTEM_EXTRA_DIR_WITH_FILE_NOT_FOUND = "systemExtraDirWithFileNotFound" } export interface SystemExtraDirWithFileNotFoundError { type: SystemExtraErrorName.SYSTEM_EXTRA_DIR_WITH_FILE_NOT_FOUND; file: string; } export type SystemExtraErrorInfo = SystemExtraDirWithFileNotFoundError; export declare function findAncestorDirIncludingNameAsync({ fs: { readdirAsync }, path }: System, searchFrom: string, name: string): Promise; export declare function copyAsync(sys: System, sourcePath: string, destinationPath: string): Promise; export declare function mkdirpAsync(sys: System, directoryPath: string): Promise; export declare function rmdirAsync(sys: System, directoryPath: string): Promise; export declare function removeDirOrFileIfExistsAsync(sys: System, dirOrFile: string): Promise; export declare function unlinkIfExistsAsync({ fs: { unlinkAsync } }: System, filepath: string): Promise; export declare function writeFileAtomicallyAsync(sys: System, filepath: string, content: Buffer): Promise; export declare function atomicify(sys: System): System; export declare function readJsonIfExistsAsync({ fs: { readFileAsync } }: System, path: string): Promise | null>; export declare function writeFormattedJsonAsync(sys: System, path: string, data: any): Promise; export declare function findExtensionAsync({ fs: { readFileAsync } }: System, name: string, extensions: string[]): Promise; /** * Determine whether a directory exists in a given system on a given path. */ export declare function dirExistsAsync(sys: System, path: string): Promise; interface WhenModified { whenModified: Promise; } /** * Wait for the modification or deletion of a file located on a given System * and at a given path. * * To promote cross-platform consistency (and to tolerate certain kinds of file * operations), this function detects change by reading the watched file's * contents. This heuristic may make the function unsuitable for use with large * files. */ export declare function watchFileAsync(sys: System, path: string): Promise; export {};