Ingest Files
Statically importing files as a Str
or a List U8
(list of bytes):
import "some-file" as someStr : Str import "some-file" as someBytes : List U8
Code
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" } import pf.Stdout import "sample.txt" as sample : Str main! = \_args -> Stdout.line! "$(sample)"
Output
Run this from the directory that has main.roc
in it:
$ roc main.roc The quick brown fox jumps over the lazy dog