E7022 Stdlib Validation Errors

file-already-exists

file or directory already exists

When this occurs

Attempting to create a file or directory that already exists

Example error message

error[E7022]: file or directory already exists: mkdir /existing/dir: file exists

How to fix

Check if the file/directory exists with `io.exists()` before creation. Choose a different name or remove the existing one first.

Related errors