Last active
December 2, 2021 19:13
-
-
Save trendoid/ad4c5f3b58fc09c6a0ee472a0fd869d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For more information see https://aka.ms/fsharp-console-apps | |
printfn "Console App: Started!" | |
open System.IO | |
let baseDirectory = __SOURCE_DIRECTORY__ | |
let filePath = "Text.txt" | |
let fullPath = Path.Combine(baseDirectory, filePath) | |
let readFilesTask (path1) = | |
task { | |
let! content = File.ReadAllTextAsync(path1) | |
return content | |
} | |
printfn "Content: %s" (readFilesTask(fullPath).Result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment