///
import { Volume, TData, TMode, TFlags, TFlagsCopy, TTime, IOptions, IAppendFileOptions, IMkdirOptions, IReaddirOptions, IReadFileOptions, IRealpathOptions, IWriteFileOptions, IStatOptions, IRmOptions } from './volume';
import Stats from './Stats';
import Dirent from './Dirent';
import { TDataOut } from './encoding';
import { PathLike, symlink } from 'fs';
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 = PathLike | IFileHandle;
export interface IPromisesAPI {
FileHandle: any;
access(path: PathLike, mode?: number): Promise;
appendFile(path: TFileHandle, data: TData, options?: IAppendFileOptions | string): Promise;
chmod(path: PathLike, mode: TMode): Promise;
chown(path: PathLike, uid: number, gid: number): Promise;
copyFile(src: PathLike, dest: PathLike, flags?: TFlagsCopy): Promise;
lchmod(path: PathLike, mode: TMode): Promise;
lchown(path: PathLike, uid: number, gid: number): Promise;
link(existingPath: PathLike, newPath: PathLike): Promise;
lstat(path: PathLike, options?: IStatOptions): Promise;
mkdir(path: PathLike, options?: TMode | IMkdirOptions): Promise;
mkdtemp(prefix: string, options?: IOptions): Promise;
open(path: PathLike, flags: TFlags, mode?: TMode): Promise;
readdir(path: PathLike, options?: IReaddirOptions | string): Promise;
readFile(id: TFileHandle, options?: IReadFileOptions | string): Promise;
readlink(path: PathLike, options?: IOptions): Promise;
realpath(path: PathLike, options?: IRealpathOptions | string): Promise;
rename(oldPath: PathLike, newPath: PathLike): Promise;
rmdir(path: PathLike): Promise;
rm(path: PathLike, options?: IRmOptions): Promise;
stat(path: PathLike, options?: IStatOptions): Promise;
symlink(target: PathLike, path: PathLike, type?: symlink.Type): Promise;
truncate(path: PathLike, len?: number): Promise;
unlink(path: PathLike): Promise;
utimes(path: PathLike, 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;