Documentation
¶
Overview ¶
Package fsops provides filesystem operations with OS-appropriate implementations. On POSIX the operations are thin wrappers over the standard library; on Windows they add cmd/PowerShell fallbacks for the cases where the Win32 layer rejects an operation the Go runtime issued (e.g. RemoveAll on a directory containing a junction).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteFileAtomic ¶
WriteFileAtomic writes data to path atomically: a temp file in the same directory is written and closed, then renamed into place, so a concurrent reader never observes a partial file. The parent directory must already exist. The resulting file carries os.CreateTemp's owner-only mode (0600), matching the prior sidecar writers; callers needing a different mode chmod the final path themselves.
This is the single atomic-write primitive shared by the YAML sidecar writers (scoring, review/labels) and the lockfile writer; callers marshal their own bytes and hand them here rather than re-implementing temp+rename.
Types ¶
This section is empty.