import { FileSystemDirectoryHandle } from 'native-file-system-adapter';
import { DownloadContext } from '../../context';
import { IEventHub } from '../../events';
import { IStorage } from '../../storage';
import { ILogger } from '../../utilities';

export interface IMapping {
    handle: FileSystemDirectoryHandle;
    location: string;
}
export declare class UserActivationRequiredError {
    type: string;
}
export declare class DiskStorage implements IStorage {
    readonly context: DownloadContext;
    private logger;
    private eventHub;
    private db;
    private cachedHandle;
    private cacheWritable;
    constructor(context: DownloadContext, logger: ILogger, eventHub: IEventHub);
    private getRootHandle;
    private getHandle;
    private getFileHandle;
    private getWritable;
    createRoot(path: string): Promise<string | null>;
    createDefaultRoot(): Promise<string | null>;
    getDefaultRootName(): Promise<string | null>;
    removeDefaultRoot(): Promise<void>;
    writable(path: string): Promise<boolean>;
    store(path: string, data: ArrayBuffer): Promise<boolean>;
    exists(path: string): Promise<boolean>;
    storePartial(path: string, offset: number, data: ArrayBuffer): Promise<boolean>;
    flushStoredPartial(path: string): Promise<boolean>;
    remove(path: string): Promise<boolean>;
    combine(path: string, chunks: Array<{
        from: number;
        path: string;
        to: number;
    }>): Promise<boolean>;
    getSize(path: string): Promise<number>;
    get(path: string): Promise<ArrayBuffer | null>;
}
