markmv - v1.39.2
    Preparing search index...

    Function buildFileTree

    • Groups scanned markdown files into a nested directory tree.

      Files under node_modules, .git, or dist directories are excluded at any depth. Directories sort before files and each group sorts alphabetically. When maxDepth is given, entries deeper than the limit are cut from the rendering (the affected directory is flagged truncated); statistics computed from the scanned files are unaffected because they never read this tree.

      Parameters

      • files: ScannedMarkdownFile[]

        Scanned file measurements for the full scan

      • OptionalmaxDepth: number

        Maximum rendering depth, where the root is depth 0 and its children depth 1

      Returns TreeDirectoryNode

      The root directory node; its name and path are empty strings

      Error if a scanned file carries an empty relative path