Statistics relating to a UnixFS DAG

interface UnixFSStats {
    blocks: number;
    cid: CID<unknown, number, number, Version>;
    dagSize: bigint;
    fileSize: bigint;
    localDagSize: bigint;
    localFileSize: bigint;
    mode?: number;
    mtime?: Mtime;
    type: "file" | "raw" | "directory";
    unixfs?: UnixFS;
}

Properties

blocks: number

How many blocks make up the DAG - nb. this will only be accurate if all blocks are present in the local blockstore

cid: CID<unknown, number, number, Version>

The file or directory CID

dagSize: bigint

The size of the DAG that holds the file in bytes

fileSize: bigint

The size of the file in bytes

localDagSize: bigint

How much of the DAG that holds the file is in the local blockstore

localFileSize: bigint

How much of the file is in the local block store

mode?: number

The file or directory mode

mtime?: Mtime

The file or directory mtime

type: "file" | "raw" | "directory"

The type of file

unixfs?: UnixFS

UnixFS metadata about this file or directory. Will not be present if the node is a raw type.