feat(config): 支持完整配置导入导出

This commit is contained in:
上玄
2026-08-12 09:34:02 +08:00
parent 988ba63d40
commit 3fc04eeb4f
17 changed files with 1047 additions and 91 deletions
@@ -0,0 +1,21 @@
//go:build windows
package client
import "golang.org/x/sys/windows"
func replaceExportFile(sourcePath, targetPath string) error {
source, err := windows.UTF16PtrFromString(sourcePath)
if err != nil {
return err
}
target, err := windows.UTF16PtrFromString(targetPath)
if err != nil {
return err
}
return windows.MoveFileEx(
source,
target,
windows.MOVEFILE_REPLACE_EXISTING|windows.MOVEFILE_WRITE_THROUGH,
)
}