js-ipfs-unixfs
    Preparing search index...

    Interface UnixFSDirectory

    If the entry is a directory, entry.entries() returns further entry objects:

    if (entry.type === 'directory') {
    for await (const entry of dir.content()) {
    console.info(entry.name)
    }
    }
    interface UnixFSDirectory {
        cid: CID;
        node: PBNode;
        type: "directory";
        unixfs: UnixFS;
        entries(
            options?: ExporterOptions,
        ): AsyncGenerator<UnixFSDirectoryEntry, void, unknown>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    Methods

    Properties

    cid: CID

    The CID of the entry

    node: PBNode
    type: "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
    }
    unixfs: UnixFS

    Methods