Repository F# setup
open System
open System.IO
open System.Threading
open System.Threading.Tasks
open Axial
open Axial.Console
open Axial.FileSystem
open Axial.Hosting
open Axial.Hosting.Browser
open Axial.Hosting.Node
open Axial.State
open Axial.Telemetry
open Axial.Telemetry.JavaScript

FileSystem

Axial.FileSystem makes file access an explicit dependency. Install it once and open Axial.FileSystem:

dotnet add package Axial.FileSystem
Verified
open Axial.FileSystem

The package contains the IFileSystem contract and live FileSystem service, the in-memory TestFileSystem, and the higher-level Files and AppendLog operations. Files and AppendLog are .NET-only because their streaming and framed-log implementations use System.IO types that Fable cannot compile.

Guides

  1. Files and directories: paths, reads, writes, directory operations, and typed FileSystemError values.
  2. Streaming, atomic writes, and the append log: Files.walk, Files.lines, Files.writeAtomic, and AppendLog.

Reference

The generated FileSystem API covers the service contract and the live and test implementations. The guides show how to compose the operations in a workflow.