flix

0.69.3

Fs.WriteFile

eff WriteFileSource

An effect used to write the contents of a file as a string.

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.