# ensure_file

Ensure a file exists. Returns error if it doesn't exist or is not a file.

```rhai
ensure_file(path: &str) -> String
```

## Examples

```rhai
ensure_file("/etc/myapp/config.yaml")?;
let config = file_read("/etc/myapp/config.yaml");
```

```rhai
ensure_file("/var/run/myapp.pid")?;
```
