Documentation
¶
Overview ¶
Package renameio writes files atomically by renaming temporary files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Pattern ¶
Pattern returns a glob pattern that matches the unrenamed temporary files created when writing to filename.
func ReadFile ¶ added in go1.13
ReadFile is like os.ReadFile, but on Windows retries spurious errors that may occur if the file is concurrently replaced.
Errors are classified heuristically and retries are bounded, so even this function may occasionally return a spurious error on Windows. If so, the error will likely wrap one of:
- syscall.ERROR_ACCESS_DENIED
- syscall.ERROR_FILE_NOT_FOUND
- internal/syscall/windows.ERROR_SHARING_VIOLATION
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.