Function inTemporaryDirectory

  • Creates a temporary directory and ties its lifecycle to the lifecycle of the callback.

    Type Parameters

    • T

    Parameters

    • callback: ((tmpDir) => T | Promise<T>)

      The callback that receives the temporary directory.

        • (tmpDir): T | Promise<T>
        • Parameters

          • tmpDir: string

          Returns T | Promise<T>

    Returns Promise<T>