返回 DeepSeek-Reasonix
local_save_replace_windows.go
根目录 / desktop / local_save_replace_windows.go
1 //go:build windows
2
3 package main
4
5 import "golang.org/x/sys/windows"
6
7 // windows.Rename uses MoveFileEx(MOVEFILE_REPLACE_EXISTING), preserving the
8 // old destination when replacement fails instead of deleting it first.
9 func replaceLocalSaveDestination(temp, target string) error {
10 return windows.Rename(temp, target)
11 }
12
12 lines GO