返回 DeepSeek-Reasonix
shortcut_path_windows.go
根目录 / internal / appidentity / shortcut_path_windows.go
1 //go:build windows
2
3 package appidentity
4
5 import (
6 "os"
7
8 "golang.org/x/sys/windows"
9
10 "reasonix/internal/fileutil"
11 )
12
13 func existingShortcutPath(path string) (string, error) {
14 file, err := os.Open(path)
15 if err != nil {
16 return "", err
17 }
18 defer file.Close()
19 return fileutil.FinalWindowsPath(windows.Handle(file.Fd()))
20 }
21
21 lines GO