/* * Copyright 2026 Flix Authors * * Use of this source code is governed by the Apache 2.0 license * that can be found in the LICENSE.md file. */////// Effect for creating a temporary directory, and its functions.///pubmod Fs.MkTempDir {use Fs.FileWrite////// Effect for creating a temporary directory.////// Use the `MkTempDir.runWithFileWrite` handler.///pubeffMkTempDir {////// Creates a new temporary directory with the given prefix.////// Returns the path to the directory.///defmkTempDir(prefix: String): Result[IoError, String] }////// Handles the `MkTempDir` effect of the given function `f` using the `FileWrite` effect.///pubdefrunWithFileWrite(f: Unit -> a \ ef): a \ (ef - MkTempDir) + FileWrite =run { f() } withhandlerMkTempDir {defmkTempDir(prefix, k) = k(Fs.FileWrite.mkTempDir(prefix)) }}