js-ipfs-unixfs
    Preparing search index...

    Interface Exportable

    interface Exportable {
        cid: CID;
        type: "object" | "identity" | "raw" | "file" | "directory";
    }

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    cid: CID

    The CID of the entry

    type: "object" | "identity" | "raw" | "file" | "directory"

    A disambiguator to allow TypeScript to work out the type of the entry.

    if (entry.type === 'file') {
    // access UnixFSFile properties safely
    }

    if (entry.type === 'directory') {
    // access UnixFSDirectory properties safely
    }