chore: 并入 iotlcm-worker-svr 历史到 worker-svr/(原提交 96f0f4e)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:03 +08:00
422 changed files with 80993 additions and 0 deletions
@@ -0,0 +1,21 @@
//go:build windows
package archive
import "golang.org/x/sys/windows"
func atomicReplace(from, to string) error {
fromUTF16, err := windows.UTF16PtrFromString(from)
if err != nil {
return err
}
toUTF16, err := windows.UTF16PtrFromString(to)
if err != nil {
return err
}
return windows.MoveFileEx(fromUTF16, toUTF16, windows.MOVEFILE_REPLACE_EXISTING|windows.MOVEFILE_WRITE_THROUGH)
}
// Windows has no portable directory fsync operation. MoveFileEx with
// MOVEFILE_WRITE_THROUGH provides the strongest supported replacement flush.
func syncDirectory(string) error { return nil }