@karmaniverous/stan
    Preparing search index...

    Function ensureOutputDir

    • Ensure the STAN workspace exists and manage output/diff subdirectories.

      Behavior:

      • Always ensure stanPath/output and stanPath/diff exist.
      • Also ensure stanPath/patch exists so archives can include it.
      • When keep === false, copy output/archive.tar to diff/archive.prev.tar if present, then clear only the output directory.

      Parameters

      • cwd: string

        Repo root.

      • stanPath: string

        Workspace folder (e.g., .stan).

      • keep: boolean = false

        When true, do not clear the output directory.

      Returns Promise<string>

      Absolute path to the workspace root (stanPath).