/* * 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 checking whether a file is writable, and its functions.///pubmod Fs.IsWritable {use Fs.FilePermission////// Effect for checking whether a file is writable.////// Use the `IsWritable.runWithFilePermission` handler.///pubeffIsWritable {////// Returns `true` if the given file `f` is writable.///defisWritable(f: String): Result[IoError, Bool] }////// Handles the `IsWritable` effect of the given function `f` using the `FilePermission` effect.///pubdefrunWithFilePermission(f: Unit -> a \ ef): a \ (ef - IsWritable) + FilePermission =run { f() } withhandlerIsWritable {defisWritable(filename, k) = k(Fs.FilePermission.isWritable(filename)) }}