ZenFS
    Preparing search index...

    Interface Backend<FS, TOptions>

    A backend

    interface Backend<
        FS extends FileSystem = FileSystem,
        TOptions extends object = object,
    > {
        name: string;
        options: OptionsConfig<TOptions>;
        create(options: TOptions & Partial<SharedConfig>): FS | Promise<FS>;
        isAvailable(config: TOptions): boolean | Promise<boolean>;
    }

    Type Parameters

    Index

    Properties

    Methods

    Properties

    name: string

    A name to identify the backend.

    Describes all of the options available for this backend.

    Methods

    • Whether the backend is available in the current environment. It supports checking synchronously and asynchronously

      Returns 'true' if this backend is available in the current environment. For example, a backend using a browser API will return 'false' if the API is unavailable

      Parameters

      Returns boolean | Promise<boolean>