flix

0.78.0

WriteFile

Effect for writing a string to a file, and its functions.

eff WriteFileSource

Effect for writing a string to a file.

Use the WriteFile.runWithFileWrite handler.

Operations

def write(data: { str = String }, f: String): Result[IoError, Unit] \ WriteFile§ Source

Writes str to the given file f.

Creates file f if it does not exist. Overwrites it if it exists.

Definitions

def runWithFileWrite(f: Unit -> a \ ef): a \ (ef - WriteFile) + FileWrite§ Source

Handles the WriteFile effect of the given function f using the FileWrite effect.