declare module "fs" {
    /**
     * Asynchronous rename.
     * @param oldPath
     * @param newPath
     * @param callback No arguments other than a possible exception are given to the completion callback.
     */
    export function renameAsync(oldPath: string, newPath: string): Promise<void>;
    export function truncateAsync(path: string | Buffer, len?: number): Promise<void>;
    export function ftruncateAsync(fd: number, len?: number): Promise<void>;
    export function chownAsync(path: string | Buffer, uid: number, gid: number): Promise<void>;
    export function fchownAsync(fd: number, uid: number, gid: number): Promise<void>;
    export function lchownAsync(path: string | Buffer, uid: number, gid: number): Promise<void>;
    export function chmodAsync(path: string | Buffer, mode: number): Promise<void>;
    export function chmodAsync(path: string | Buffer, mode: string): Promise<void>;
    export function fchmodAsync(fd: number, mode: number): Promise<void>;
    export function fchmodAsync(fd: number, mode: string): Promise<void>;
    export function lchmodAsync(path: string | Buffer, mode: number): Promise<void>;
    export function lchmodAsync(path: string | Buffer, mode: string): Promise<void>;
    export function statAsync(path: string | Buffer): Promise<Stats>;
    export function lstatAsync(path: string | Buffer): Promise<Stats>;
    export function fstatAsync(fd: number): Promise<Stats>;
    export function linkAsync(srcpath: string | Buffer, dstpath: string | Buffer): Promise<void>;
    export function symlinkAsync(srcpath: string | Buffer, dstpath: string | Buffer, type?: string): Promise<void>;
    export function readlinkAsync(path: string | Buffer): Promise<string>;
    export function realpathAsync(path: string | Buffer, cache?: { [path: string]: string }): Promise<string>;
    /*
     * Asynchronous unlink - deletes the file specified in {path}
     *
     * @param path
     */
    export function unlinkAsync(path: string | Buffer): Promise<void>;
    /*
     * Asynchronous rmdir - removes the directory specified in {path}
     *
     * @param path
     */
    export function rmdirAsync(path: string | Buffer): Promise<void>;
    /*
     * Asynchronous mkdir - creates the directory specified in {path}.  Parameter {mode} defaults to 0777.
     *
     * @param path
     * @param mode
     */
    export function mkdirAsync(path: string | Buffer, mode?: number): Promise<void>;
    /*
     * Asynchronous mkdir - creates the directory specified in {path}.  Parameter {mode} defaults to 0777.
     *
     * @param path
     * @param mode
     */
    export function mkdirAsync(path: string | Buffer, mode?: string): Promise<void>;
    /*
     * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
     *
     * @param prefix
     * @returns Returns the created folder path.
     */
    export function mkdtempAsync(prefix: string): Promise<string>;
    export function readdirAsync(path: string | Buffer): Promise<string[]>;
    export function closeAsync(fd: number): Promise<void>;
    export function openAsync(path: string | Buffer, flags: string | number, mode?: number): Promise<number>;
    export function utimesAsync(path: string | Buffer, atime: number, mtime: number): Promise<void>;
    export function utimesAsync(path: string | Buffer, atime: Date, mtime: Date): Promise<void>;
    export function futimesAsync(fd: number, atime: number, mtime: number): Promise<void>;
    export function futimesAsync(fd: number, atime: Date, mtime: Date): Promise<void>;
    export function fsyncAsync(fd: number): Promise<void>;
    export function writeAsync(fd: number, buffer: Buffer, offset: number, length: number, position?: number): Promise<number>;
    export function writeAsync(fd: number, data: any, position?: number, enconding?: string): Promise<number>;
    export function readAsync(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<number>;
    /*
     * Asynchronous readFile - Asynchronously reads the entire contents of a file.
     *
     * @param fileName
     * @param encoding
     */
    export function readFileAsync(filename: string, encoding: string): Promise<string>;
    /*
     * Asynchronous readFile - Asynchronously reads the entire contents of a file.
     *
     * @param fileName
     * @param options An object with optional {encoding} and {flag} properties.  If {encoding} is specified, readFileAsync returns a string; otherwise it returns a Buffer.
     */
    export function readFileAsync(filename: string, options: { encoding: string; flag?: string; }): Promise<string>;
    /*
     * Asynchronous readFile - Asynchronously reads the entire contents of a file.
     *
     * @param fileName
     * @param options An object with optional {encoding} and {flag} properties.  If {encoding} is specified, readFileAsync returns a string; otherwise it returns a Buffer.
     */
    export function readFileAsync(filename: string, options?: { flag?: string; }): Promise<Buffer>;
    export function writeFileAsync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): Promise<void>;
    export function writeFileAsync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): Promise<void>;
    export function appendFileAsync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): Promise<void>;
    export function appendFileAsync(filename: string, data: any, options?: { encoding?: string; mode?: string; flag?: string; }): Promise<void>;
    export function existsAsync(path: string | Buffer): Promise<boolean>;


}

declare module 'child_process' {
    export function execFileAsync(command: string): Buffer;
    export function execFileAsync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
    export function execFileAsync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
    export function execFileAsync(command: string, options?: ExecFileSyncOptions): Buffer;
    export function execFileSAsnc(command: string, args?: string[], options?: ExecFileSyncOptionsWithStringEncoding): string;
    export function execFileSyAsc(command: string, args?: string[], options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
    export function execFileSynAs(command: string, args?: string[], options?: ExecFileSyncOptions): Buffer;
}