List files in directory

Is it possible to list all files in a directory akin to fs.readdir, or is our file I/O limited to open?

I’ve built a test runner where I’d like to dynamically list these files and use them for benchmark parameterization.

Unfortunately that’s not possible currently, sorry. Follow Allow listing of files in the init context · Issue #1005 · grafana/k6 · GitHub for updates, and you can see some potential workarounds in it as well.