E7019 Stdlib Validation Errors

cannot-remove-file

io.remove_dir() can only remove directories

When this occurs

`io.remove_dir()` called on a file path

Example error message

error[E7019]: io.remove_dir() can only remove directories, use io.remove() for files

How to fix

Use `io.remove()` to remove files. Use `io.is_file()` to check if a path is a file.

Related errors