Files
bifrost/cli/internal/update/replace.go
Beyhan Oğur 880f412e2c first commit
2026-04-26 21:52:23 +03:00

12 lines
281 B
Go

//go:build !windows
package update
import "os"
// atomicReplace replaces oldPath with newPath using os.Rename.
// On Unix systems, this is atomic if both paths are on the same filesystem.
func atomicReplace(oldPath, newPath string) error {
return os.Rename(newPath, oldPath)
}