/* * 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 directory and all its parent directories, and its functions.///pubmod Fs.MkDirs {use Fs.FileWrite////// Effect for creating a directory and all its parent directories.////// Use the `MkDirs.runWithFileWrite` handler.///pubeffMkDirs {////// Creates the directory `d` and all its parent directories.///defmkDirs(d: String): Result[IoError, Unit] }////// Handles the `MkDirs` effect of the given function `f` using the `FileWrite` effect.///pubdefrunWithFileWrite(f: Unit -> a \ ef): a \ (ef - MkDirs) + FileWrite =run { f() } withhandlerMkDirs {defmkDirs(d, k) = k(Fs.FileWrite.mkDirs(d)) }}