/// import { Volume, TFilePath, TData, TMode, TFlags, TFlagsCopy, TSymlinkType, TTime, IOptions, IAppendFileOptions, IMkdirOptions, IReaddirOptions, IReadFileOptions, IRealpathOptions, IWriteFileOptions, IStatOptions } from './volume'; import Stats from './Stats'; import Dirent from './Dirent'; import { TDataOut } from './encoding'; export interface TFileHandleReadResult { bytesRead: number; buffer: Buffer | Uint8Array; } export interface TFileHandleWriteResult { bytesWritten: number; buffer: Buffer | Uint8Array; } export interface IFileHandle { fd: number; appendFile(data: TData, options?: IAppendFileOptions | string): Promise; chmod(mode: TMode): Promise; chown(uid: number, gid: number): Promise; close(): Promise; datasync(): Promise; read(buffer: Buffer | Uint8Array, offset: number, length: number, position: number): Promise; readFile(options?: IReadFileOptions | string): Promise; stat(options?: IStatOptions): Promise; truncate(len?: number): Promise; utimes(atime: TTime, mtime: TTime): Promise; write(buffer: Buffer | Uint8Array, offset?: number, length?: number, position?: number): Promise; writeFile(data: TData, options?: IWriteFileOptions): Promise; } export declare type TFileHandle = TFilePath | IFileHandle; export interface IPromisesAPI { FileHandle: any; access(path: TFilePath, mode?: number): Promise; appendFile(path: TFileHandle, data: TData, options?: IAppendFileOptions | string): Promise; chmod(path: TFilePath, mode: TMode): Promise; chown(path: TFilePath, uid: number, gid: number): Promise; copyFile(src: TFilePath, dest: TFilePath, flags?: TFlagsCopy): Promise; lchmod(path: TFilePath, mode: TMode): Promise; lchown(path: TFilePath, uid: number, gid: number): Promise; link(existingPath: TFilePath, newPath: TFilePath): Promise; lstat(path: TFilePath, options?: IStatOptions): Promise; mkdir(path: TFilePath, options?: TMode | IMkdirOptions): Promise; mkdtemp(prefix: string, options?: IOptions): Promise; open(path: TFilePath, flags: TFlags, mode?: TMode): Promise; readdir(path: TFilePath, options?: IReaddirOptions | string): Promise; readFile(id: TFileHandle, options?: IReadFileOptions | string): Promise; readlink(path: TFilePath, options?: IOptions): Promise; realpath(path: TFilePath, options?: IRealpathOptions | string): Promise; rename(oldPath: TFilePath, newPath: TFilePath): Promise; rmdir(path: TFilePath): Promise; stat(path: TFilePath, options?: IStatOptions): Promise; symlink(target: TFilePath, path: TFilePath, type?: TSymlinkType): Promise; truncate(path: TFilePath, len?: number): Promise; unlink(path: TFilePath): Promise; utimes(path: TFilePath, atime: TTime, mtime: TTime): Promise; writeFile(id: TFileHandle, data: TData, options?: IWriteFileOptions): Promise; } export declare class FileHandle implements IFileHandle { private vol; fd: number; constructor(vol: Volume, fd: number); appendFile(data: TData, options?: IAppendFileOptions | string): Promise; chmod(mode: TMode): Promise; chown(uid: number, gid: number): Promise; close(): Promise; datasync(): Promise; read(buffer: Buffer | Uint8Array, offset: number, length: number, position: number): Promise; readFile(options?: IReadFileOptions | string): Promise; stat(options?: IStatOptions): Promise; sync(): Promise; truncate(len?: number): Promise; utimes(atime: TTime, mtime: TTime): Promise; write(buffer: Buffer | Uint8Array, offset?: number, length?: number, position?: number): Promise; writeFile(data: TData, options?: IWriteFileOptions): Promise; } export default function createPromisesApi(vol: Volume): null | IPromisesAPI;