///
import * as fs from 'fs';
import { Result } from './result';
export declare const copyFile: typeof fs.copyFile.__promisify__;
/**
* resolve :: Buffer
* reject :: NodeJS.ErrnoException
* */
export declare const readFile: typeof fs.readFile.__promisify__;
export declare const writeFile: typeof fs.writeFile.__promisify__;
export declare const readdir: typeof fs.readdir.__promisify__;
export declare const unlink: typeof fs.unlink.__promisify__;
export declare const rename: typeof fs.rename.__promisify__;
/** Does not dereference symbolic links. */
export declare const lstat: typeof fs.lstat.__promisify__;
/** Does dereference symbolic links */
export declare const stat: typeof fs.stat.__promisify__;
export declare const mkdir: typeof fs.mkdir.__promisify__;
export declare const exists: typeof fs.exists.__promisify__;
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;
export type IterateFileByLineOptions = {
encoding?: BufferEncoding;
batchSize?: number;
close?: () => void;
};
/**
* linefeed "\n" is omitted from the yielded value
* but "\r" if exists is preserved as is
* */
export declare function iterateFileByLine(file: string, options?: IterateFileByLineOptions): Generator;
export declare function verboseWriteFileSync(file: string, content: string | Buffer): void;