Files
dypid-client/utils/folder/folder.go
YGXB_net cccb31cbc5
Some checks failed
构建上传工具 / build-tool (push) Failing after 2m9s
feat: 初步完成GUI界面添加
2025-10-13 21:32:02 +08:00

21 lines
400 B
Go

package folder
/*
#cgo windows LDFLAGS: -lole32 -luuid
#include "windows_dialog.h"
*/
import "C"
// OpenFolderDialog 调用Windows原生文件夹选择对话框
// 返回选择的文件夹路径,如果用户取消选择则返回空字符串
func OpenFolderDialog() string {
cPath := C.OpenFolderDialog()
if cPath == nil {
return ""
}
defer C.FreeMemory(cPath)
return C.GoString(cPath)
}