import Buffer, { BufferEncoding } from 'bare-buffer' import fs, { AppendFileOptions, Dir, MkdirOptions, OpendirOptions, ReadFileOptions, ReaddirOptions, ReadlinkOptions, RealpathOptions, RmOptions, Stats, Watcher, WatcherOptions, WriteFileOptions } from '.' export function access(filepath: string, mode?: number): Promise export function appendFile( filepath: string, data: string | Buffer | ArrayBufferView, opts?: AppendFileOptions ): Promise export function appendFile( filepath: string, data: string | Buffer | ArrayBufferView, encoding: BufferEncoding ): Promise export function chmod(filepath: string, mode: string | number): Promise export function copyFile(src: string, dst: string, mode?: number): Promise export function lstat(filepath: string): Promise export function mkdir(filepath: string, opts?: MkdirOptions): Promise export function mkdir(filepath: string, mode: number): Promise export function opendir( filepath: string, opts: OpendirOptions & { encoding?: BufferEncoding } ): Promise> export function opendir( filepath: string, opts: OpendirOptions & { encoding: 'buffer' } ): Promise> export function opendir(filepath: string, opts: OpendirOptions): Promise export function opendir( filepath: string, encoding: BufferEncoding ): Promise> export function opendir( filepath: string, encoding: 'buffer' ): Promise> export function opendir( filepath: string, encoding: BufferEncoding | 'buffer' ): Promise export function opendir(filepath: string): Promise> export function readFile( filepath: string, opts: ReadFileOptions & { encoding: BufferEncoding } ): Promise export function readFile( filepath: string, opts: ReadFileOptions & { encoding?: 'buffer' } ): Promise export function readFile( filepath: string, opts: ReadFileOptions ): Promise export function readFile( filepath: string, encoding: BufferEncoding ): Promise export function readFile(filepath: string, encoding: 'buffer'): Promise export function readFile( filepath: string, encoding?: BufferEncoding | 'buffer' ): Promise export function readFile(filepath: string): Promise export function readdir( filepath: string, opts: ReaddirOptions & { encoding?: BufferEncoding } ): Promise[] | string[]> export function readdir( filepath: string, opts: ReaddirOptions & { encoding?: BufferEncoding; withFileTypes: true } ): Promise[]> export function readdir( filepath: string, opts: ReaddirOptions & { encoding?: BufferEncoding; withFileTypes?: false } ): Promise export function readdir( filepath: string, opts: ReaddirOptions & { encoding: 'buffer' } ): Promise[] | Buffer[]> export function readdir( filepath: string, opts: ReaddirOptions & { encoding: 'buffer'; withFileTypes: true } ): Promise[]> export function readdir( filepath: string, opts: ReaddirOptions & { encoding: 'buffer'; withFileTypes?: false } ): Promise export function readdir( filepath: string, opts: ReaddirOptions & { withFileTypes: true } ): Promise[]> export function readdir( filepath: string, opts: ReaddirOptions & { withFileTypes?: false } ): Promise export function readdir( filepath: string, opts: ReaddirOptions ): Promise export function readdir( filepath: string, encoding: BufferEncoding ): Promise export function readdir(filepath: string, encoding: 'buffer'): Promise export function readdir( filepath: string, encoding: BufferEncoding | 'buffer' ): Promise export function readdir(filepath: string): Promise export function readlink( filepath: string, opts: ReadlinkOptions & { encoding?: BufferEncoding } ): Promise export function readlink( filepath: string, opts: ReadlinkOptions & { encoding: 'buffer' } ): Promise export function readlink( filepath: string, opts: ReadlinkOptions ): Promise export function readlink( filepath: string, encoding: BufferEncoding ): Promise export function readlink(filepath: string, encoding: 'buffer'): Promise export function readlink( filepath: string, encoding: BufferEncoding | 'buffer' ): Promise export function readlink(filepath: string): Promise export function realpath( filepath: string, opts: RealpathOptions & { encoding?: BufferEncoding } ): Promise export function realpath( filepath: string, opts: RealpathOptions & { encoding: 'buffer' } ): Promise export function realpath( filepath: string, opts: RealpathOptions ): Promise export function realpath( filepath: string, encoding: BufferEncoding ): Promise export function realpath(filepath: string, encoding: 'buffer'): Promise export function realpath( filepath: string, encoding: BufferEncoding | 'buffer' ): Promise export function realpath(filepath: string): Promise export function rename(src: string, dst: string): Promise export function rm(filepath: string, opts?: RmOptions): Promise export function rmdir(filepath: string): Promise export function stat(filepath: string): Promise export function symlink( target: string, filepath: string, type?: string | number ): Promise export function unlink(filepath: string): Promise export function watch( filepath: string, opts: WatcherOptions & { encoding?: BufferEncoding } ): Watcher export function watch( filepath: string, opts: WatcherOptions & { encoding: 'buffer' } ): Watcher export function watch(filepath: string, opts: WatcherOptions): Watcher export function watch( filepath: string, encoding: BufferEncoding ): Watcher export function watch(filepath: string, encoding: 'buffer'): Watcher export function watch( filepath: string, encoding: BufferEncoding | 'buffer' ): Watcher export function watch(filepath: string): Watcher export function writeFile( filepath: string, data: string | Buffer | ArrayBufferView, opts?: WriteFileOptions ): Promise export function writeFile( filepath: string, data: string | Buffer | ArrayBufferView, encoding: BufferEncoding ): Promise