// Type definitions for fs-extra-promise 1.0 // Project: https://github.com/overlookmotel/fs-extra-promise // Definitions by: midknight41 , Jason Swearingen , Hiromi Shikata // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 3.2 /// import * as stream from 'stream'; import * as fs from 'fs'; import * as Promise from 'bluebird'; import { CopyFilter, CopyOptions, ReadOptions, WriteOptions, MoveOptions } from 'fs-extra'; import Stats = fs.Stats; export * from 'fs-extra'; export interface MkdirOptions { fs?: any; mode?: number | undefined; } // promisified versions export function copyAsync(src: string, dest: string, options?: CopyFilter | CopyOptions): Promise; export function createFileAsync(file: string): Promise; export function mkdirsAsync(dir: string, options?: MkdirOptions): Promise; export function mkdirpAsync(dir: string, options?: MkdirOptions): Promise; export function moveAsync(src: string, dest: string, options?: MoveOptions): Promise; export function outputFileAsync(file: string, data: any): Promise; export function outputJsonAsync(file: string, data: any): Promise; export function outputJSONAsync(file: string, data: any): Promise; export function readJsonAsync(file: string, options?: ReadOptions): Promise; export function readJSONAsync(file: string, options?: ReadOptions): Promise; export function removeAsync(dir: string): Promise; export function writeJsonAsync(file: string, object: any, options?: WriteOptions): Promise; export function writeJSONAsync(file: string, object: any, options?: WriteOptions): Promise; export function renameAsync(oldPath: string, newPath: string): Promise; export function truncateAsync(fd: number, len: number): Promise; export function chownAsync(path: string, uid: number, gid: number): Promise; export function fchownAsync(fd: number, uid: number, gid: number): Promise; export function lchownAsync(path: string, uid: number, gid: number): Promise; export function chmodAsync(path: string, mode: number | string): Promise; export function fchmodAsync(fd: number, mode: number | string): Promise; export function lchmodAsync(path: string, mode: number | string): Promise; export function statAsync(path: string): Promise; export function lstatAsync(path: string): Promise; export function fstatAsync(fd: number): Promise; export function linkAsync(srcpath: string, dstpath: string): Promise; export function symlinkAsync(srcpath: string, dstpath: string, type?: fs.symlink.Type): Promise; export function readlinkAsync(path: string): Promise; export function realpathAsync(path: string, cache?: { [path: string]: string }): Promise; export function unlinkAsync(path: string): Promise; export function rmdirAsync(path: string): Promise; export function mkdirAsync(path: string, mode?: number | string): Promise; export function readdirAsync(path: string): Promise; export function closeAsync(fd: number): Promise; export function openAsync(path: string, flags: string, mode?: string): Promise; export function utimesAsync(path: string, atime: number, mtime: number): Promise; export function futimesAsync(fd: number, atime: number, mtime: number): Promise; export function fsyncAsync(fd: number): Promise; export function writeAsync(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<[number, Buffer]>; export function readAsync(fd: number, buffer: Buffer, offset: number, length: number, position: number): Promise<[number, Buffer]>; export function readFileAsync(filename: string, options: string | ReadOptions): Promise; export function readFileAsync(filename: string): Promise; export function writeFileAsync(filename: string, data: any, options?: string | WriteOptions): Promise; export function mkdtempAsync(prefix: string, options: string | {encoding: string}): Promise; export function appendFileAsync(filename: string, data: any, option?: string | WriteOptions): Promise; export function existsAsync(path: string): Promise; export function ensureDirAsync(path: string): Promise; export function isDirectory(path: string, callback?: (err: Error, isDirectory: boolean) => void): void; export function isDirectorySync(path: string): boolean; export function isDirectoryAsync(path: string): Promise;