Fsharp: Read File

By Xah Lee. Date: .

fsharp: read a file as string

// 2025-12-29
// read file into a string

open System.IO

let xfilePath = @"c:/Users/xah/web/xahlee_info/talk_show/xah_talk_show_ep735.html"
  // Use @ for verbatim strings or escape backslashes
let content: string = File.ReadAllText(xfilePath)

printfn "%s" content