/* * 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 moving or renaming a file or directory, and its functions.///pubmod Fs.MoveFile {use Fs.FileWriteuse Fs.MoveFileuse Fs.MoveOption////// Effect for moving or renaming a file or directory.////// Use the `MoveFile.runWithFileWrite` handler.///pubeffMoveFile {////// Moves (renames) the file or directory `src` to `dst` with the given `options`.///defmoveWith(src: {src = String}, dst: String, opts: Set[MoveOption]): Result[IoError, Unit] }////// Convenience function: moves `src` to `dst` with no options.///pubdefmove(src: {src = String}, dst: String): Result[IoError, Unit] \ MoveFile =Fs.MoveFile.moveWith(src, dst, Set.empty())////// Handles the `MoveFile` effect of the given function `f` using the `FileWrite` effect.///pubdefrunWithFileWrite(f: Unit -> a \ ef): a \ (ef - MoveFile) + FileWrite =run { f() } withhandlerMoveFile {defmoveWith(src, dst, opts, k) = k(Fs.FileWrite.moveWith(src, dst, opts)) }}