Function inTemporaryDirectory

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

    Type Parameters

    • T

    Parameters

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

      The callback that receives the temporary directory.

    Returns Promise<T>