MCPcopy Index your code
hub / github.com/rilldata/rill / IsOnWindowsPartitionPath

Function IsOnWindowsPartitionPath

cli/pkg/envdetect/envdetect.go:36–42  ·  view source on GitHub ↗

IsOnWindowsPartitionPath returns true if the provided path is on a Windows partition in WSL (typically paths mounted under /mnt/*)

(path string)

Source from the content-addressed store, hash-verified

34// IsOnWindowsPartitionPath returns true if the provided path is on a Windows partition
35// in WSL (typically paths mounted under /mnt/*)
36func IsOnWindowsPartitionPath(path string) bool {
37 absPath, err := filepath.Abs(path)
38 if err != nil {
39 return false
40 }
41 return strings.HasPrefix(absPath, "/mnt/")
42}
43
44// IsWSLWindowsPartition checks if the user is running on a Windows partition inside WSL
45// Returns true if both conditions are met

Callers 2

IsOnWindowsPartitionFunction · 0.85
IsWSLWindowsPartitionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected