返回 DeepSeek-Reasonix
remote_fs_windows.go
根目录 / internal / projectiondb / remote_fs_windows.go
1 //go:build windows
2
3 package projectiondb
4
5 import (
6 "path/filepath"
7 "strings"
8
9 "golang.org/x/sys/windows"
10 )
11
12 func filesystemRemote(path string) bool {
13 volume := filepath.VolumeName(filepath.Clean(path))
14 if volume == "" {
15 return false
16 }
17 root := volume
18 if !strings.HasSuffix(root, `\`) {
19 root += `\`
20 }
21 rootPtr, err := windows.UTF16PtrFromString(root)
22 return err == nil && windows.GetDriveType(rootPtr) == windows.DRIVE_REMOTE
23 }
24
24 lines GO