Function Async

  • Async() implements synchronous methods on an asynchronous file system

    Implementing classes must define _sync for the synchronous file system used as a cache.

    Synchronous methods on an asynchronous FS are implemented by performing operations over the in-memory copy, while asynchronously pipelining them to the backing store. During loading, the contents of the async file system are preloaded into the synchronous store.

    Type Parameters

    Parameters

    • FS: T

    Returns Mixin<T, {
        _sync?: FileSystem;
        createFileSync(path, flag, mode): File;
        linkSync(srcpath, dstpath): void;
        mkdirSync(path, mode): void;
        openFileSync(path, flag): File;
        queueDone(): Promise<void>;
        readdirSync(path): string[];
        ready(): Promise<void>;
        renameSync(oldPath, newPath): void;
        rmdirSync(path): void;
        statSync(path): Stats;
        syncSync(path, data, stats): void;
        unlinkSync(path): void;
    }>