js-ipfs-unixfs
    Preparing search index...

    Interface ObjectNode<T>

    Entries with a dag-cbor, dag-json, cbor or json codec CID return JavaScript object entries

    interface ObjectNode<T = any> {
        cid: CID;
        node: Uint8Array;
        object: T;
        type: "object";
    }

    Type Parameters

    • T = any

    Hierarchy (View Summary)

    Index

    Properties

    Properties

    cid: CID

    The CID of the entry

    object: T
    type: "object"

    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
    }