Effect FileSystempub

Source
:effect(pub) FileSystem
  .read-file ( Str  (Result Str Str) )
  .write-file ( Str Str  (Result Unit Str) )
  .delete-file ( Str  (Result Unit Str) )
  .file-exists ( Str  (Result Bool Str) )
Description

Filesystem effect for reading, writing, deleting, and probing files by path.

Parent chain:IOFileSystem

Operations

.read-file ( Str (Result Str Str) )

Reads a file at the given path and returns its contents or an error string.

.write-file ( Str Str (Result Unit Str) )

Writes content to a file at the given path, returning Unit or an error string.

.delete-file ( Str (Result Unit Str) )

Deletes a file at the given path.

.file-exists ( Str (Result Bool Str) )

Reports whether a file exists at the given path.