Created
September 12, 2016 18:21
-
-
Save thedebugger/941a059d2b079224e9845e8802da459a to your computer and use it in GitHub Desktop.
monadic file exists?
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
def fileExists?(Dir: String): Task[Boolean] = { | |
val task: Stream[Task, Boolean] = | |
fs2.io.file.readAll[Task](Paths.get(dir, "default.nix"), 4096) | |
exists ( _ => true ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment