subtree-hooks
    Preparing search index...

    Interface OnStatsData<CustomNode>

    Represents metadata for a file or directory within the subtree traversal.

    interface OnStatsData<CustomNode extends Node> {
        dirNode?: CustomNode;
        dirpath: string;
        file: string;
        node: CustomNode;
        path: string;
        stats: Stats;
    }

    Type Parameters

    • CustomNode extends Node

      Optional type describing the shape of the tree structure used in this traversal.

    Hierarchy (View Summary)

    Index

    Properties

    dirNode?: CustomNode

    The parent directory node in the subtree. Available during onSubTree hook.

    dirpath: string

    The absolute path of the directory containing this file. Available in all hooks.

    file: string

    The name of the file or directory (without path).

    The current node in the subtree associated with this file. Available during onDirStats and onFileStats hooks.

    path: string

    The absolute path to this file or directory.

    stats: Stats

    The Node.js fs.Stats object for this file or directory. Available during onDirStats and onFileStats hooks.