-
-
Save insanitybit/e92d4d93e4a751426e4e637a3a3d7ee5 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
actor Searcher | |
be search(env: Env, path: FilePath) => | |
var file_contents: String ref = String.create() | |
match OpenFile(path) | |
| let file: File => | |
file_contents.reserve(file.size()) | |
while file.errno() is FileOK do | |
file_contents.append(file.read_string(file.size())) | |
end | |
end | |
env.out.print(file_contents) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The string recovery could look like this: