I'm trying to list the files in my current working directory, and it doesn't seem to work...
I figured I'd ask in here before opening a bug report on the basic-cli repo, in case I'm doing something wrong.
I'm pretty new to roc.
Env.cwd
resolves into the correct path.
Task.await Env.cwd Dir.list
fails with a NotSeekable
error
Path.fromStr "." |> Dir.list
fails with Other
Path.fromStr "./" |> Dir.list
fails with Other
Path.fromStr "/" |> Dir.list
fails with Other
Path.fromStr "/home/asbjorn" |> Dir.list
fails with Other
Path.fromStr "/home/asbjorn/" |> Dir.list
fails with Other
Using roc on commit 5e911f14d854a2e0c6a81b6a583076f9a3dcc5d9, built using the nix flake.
Using basic-cli 0.5.0, Cufzl36_SnJ4QbOoEmiJ5dIpUxBvdB3NEySvuH82Wio.tar.br (URL copied from the tutorial)
Running NixOS unstable on kernel version 6.1.62
Luke Boswell said:
Yeah so
Dir.list
on basic cli is currently unimplemented and is returning an error tag rather than crashing or panicking in rust.
Ah, that makes sense then. Thanks.
Also see https://github.com/roc-lang/basic-cli/pull/136 which adds this feature. Will likely need a new release if you are using this from a URL package
Last updated: Jul 06 2025 at 12:14 UTC