E7042 Stdlib Validation Errors

read-directory-as-file

cannot read directory as file

When this occurs

`io.read_file()` or similar called with a directory path

Example error message

error[E7042]: io.read_file(): cannot read directory as file

How to fix

Use `io.read_dir()` to list directory contents. Verify the path points to a file with `io.is_file()`.

Related errors