Ingest Files
To statically import files as a Str
or a List U8
(list of bytes):
import "some-file" as some_str : Str import "some-file" as some_bytes : List U8
Code
app [main!] { cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" } import cli.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