export declare enum ErrorCode {
    EPERM = 1,
    ENOENT = 2,
    EIO = 5,
    EBADF = 9,
    EACCES = 13,
    EBUSY = 16,
    EEXIST = 17,
    ENOTDIR = 20,
    EISDIR = 21,
    EINVAL = 22,
    EFBIG = 27,
    ENOSPC = 28,
    EROFS = 30,
    ENOTEMPTY = 39,
    ENOTSUP = 95,
}
export declare const ErrorStrings: {
    [code: string]: string;
    [code: number]: string;
};
export declare class ApiError extends Error implements NodeJS.ErrnoException {
    errno: ErrorCode;
    code: string;
    path: string;
    syscall: string;
    stack: string;
    constructor(type: ErrorCode, message?: string, path?: string);
    toString(): string;
    toJSON(): any;
    static fromJSON(json: any): ApiError;
    writeToBuffer(buffer?: Buffer, i?: number): Buffer;
    static fromBuffer(buffer: Buffer, i?: number): ApiError;
    bufferSize(): number;
    static FileError(code: ErrorCode, p: string): ApiError;
    static ENOENT(path: string): ApiError;
    static EEXIST(path: string): ApiError;
    static EISDIR(path: string): ApiError;
    static ENOTDIR(path: string): ApiError;
    static EPERM(path: string): ApiError;
    static ENOTEMPTY(path: string): ApiError;
}
