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