# error: open /path/file: no such file or directory

- **ID:** `go/os-file-not-found-with-permission-denied`
- **Domain:** go
- **Category:** io_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Attempting to open a file that does not exist at the specified path, possibly due to typo or missing directory.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.20 | active | — | — |
| 1.21 | active | — | — |

## Workarounds

1. **Check file existence before opening and use filepath.Join for path construction** (95% success)
   ```
   if _, err := os.Stat(filepath.Join(dir, filename)); os.IsNotExist(err) { return err }
f, err := os.Open(filepath.Join(dir, filename))
   ```

## Dead Ends

- **Using absolute path incorrectly** — Hardcoding absolute paths breaks portability; relative paths may work. (60% fail)
