@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Interface FileBrowserDatasource<M>

    Datasource contract for the file browser.

    Implementations may back this with an in-memory tree, a REST API, IndexedDB, or any other storage mechanism. All methods may return either a synchronous value or a Promise.

    interface FileBrowserDatasource<M = unknown> {
        getChildren(
            parent: FileBrowserEntry<M> | null,
        ): FileBrowserEntry<M>[] | Promise<FileBrowserEntry<M>[]>;
        isDirectory(entry: FileBrowserEntry<M>): boolean;
    }

    Type Parameters

    • M = unknown

      Optional metadata type carried on each entry.

    Index

    Methods

    • Returns true if the given entry is a directory that can contain children (even if currently empty).

      Parameters

      Returns boolean