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

- **ID:** `go/os-open-no-such-file`
- **Domain:** go
- **Category:** io_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Attempting to open a file that does not exist, often due to a typo in the path or the file being deleted.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.13 | active | — | — |
| 1.14 | active | — | — |
| 1.15 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Use os.OpenFile with O_RDONLY and check the error.
   ```
2. **** (85% success)
   ```
   Use filepath.Abs to resolve the path and verify it.
   ```

## Dead Ends

- **** — There is a race condition between the check and the open. (50% fail)
- **** — This creates an empty file, which may not be desirable. (60% fail)
