import { FileSystem, Directory, File, ShallowDirectory } from './api';
import { InternalEventsEmitter } from './utils';
export declare class CacheFileSystem implements FileSystem {
    private fs;
    private shouldRescanOnError;
    readonly events: InternalEventsEmitter;
    baseUrl: string;
    private cache;
    private isTreeCached;
    private pathsInCache;
    constructor(fs: FileSystem, shouldRescanOnError?: boolean);
    saveFile(fullPath: string, newContent: string): Promise<void>;
    deleteFile(fullPath: string): Promise<void>;
    deleteDirectory(fullPath: string, recursive?: boolean): Promise<void>;
    ensureDirectory(fullPath: string): Promise<void>;
    loadTextFile(fullPath: string): Promise<string>;
    loadDirectoryTree(fullPath?: string): Promise<Directory>;
    loadDirectoryChildren(fullPath: string): Promise<(File | ShallowDirectory)[]>;
    dispose(): void;
    private onFsError;
    private rescanOnError();
    private emit(type, data);
    private cacheTree();
    private fill(tree);
}
