enquire-mcp API reference - v4.0.0-rc.7
    Preparing search index...

    Function noteWalkOrderKey

    • Order two directory entries so a depth-first walk emits globally sorted relative paths.

      The key is the entry name for a file and the name plus / for a directory, because every path under a directory d begins d/. Comparing bare names would be wrong wherever a separator sorts against an ordinary character: - (0x2D) precedes / (0x2F), so a-1.md must be emitted BEFORE a/b.md even though the directory a sorts before the file a-1.md by name alone.

      Parameters

      • name: string

        Directory entry name.

      • isDirectory: boolean

        Whether the entry is a directory.

      Returns string

      The comparison key for that entry.

      noteWalkOrderKey("a", true); // "a/"