import * as fs from 'fs'; import { Result } from './result'; export declare let copyFile: typeof fs.copyFile.__promisify__; /** @deprecated use native typing instead */ export declare type readOptions = { encoding?: string | null; flag?: string; } | string | undefined | null; /** * resolve :: Buffer * reject :: NodeJS.ErrnoException * */ export declare let readFile: typeof fs.readFile.__promisify__; export declare let writeFile: typeof fs.writeFile.__promisify__; export declare let readdir: typeof fs.readdir.__promisify__; export declare let unlink: typeof fs.unlink.__promisify__; export declare let rename: typeof fs.rename.__promisify__; /** Does not dereference symbolic links. */ export declare let lstat: typeof fs.lstat.__promisify__; /** Does dereference symbolic links */ export declare let stat: typeof fs.stat.__promisify__; export declare let mkdir: typeof fs.mkdir.__promisify__; export declare let exists: typeof fs.exists.__promisify__; /**@deprecated*/ export declare function exist(filename: string): Promise; export declare function hasFile(filename: string): Promise; export declare function hasDirectory(filename: string): Promise; /** @deprecated moved to write-stream.ts */ export { writeStream } from './write-stream'; export declare function scanRecursively(args: { entryPath: string; onFile?: (filename: string, basename: string) => Result; onDir?: (dirname: string, basename: string) => Result; onComplete?: () => Result; dereferenceSymbolicLinks?: boolean; skipDir?: (dirname: string, basename: string) => boolean; }): Promise; export declare function scanRecursivelySync(args: { entryPath: string; onFile?: (filename: string, basename: string) => void; onDir?: (dirname: string, basename: string) => void; onComplete?: () => void; dereferenceSymbolicLinks?: boolean; skipDir?: (dirname: string, basename: string) => boolean; }): void; export declare function readJsonFile(file: string): Promise; export declare function readJsonFileSync(file: string): any;