github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/url/paths.go (about) 1 package url 2 3 // isWindowsPath determines whether or not a raw URL string is a Windows path. 4 func isWindowsPath(raw string) bool { 5 // These will all be single-byte runes, so we can do direct byte access and 6 // comparison. 7 return len(raw) >= 3 && 8 ((raw[0] >= 'a' && raw[0] <= 'z') || (raw[0] >= 'A' && raw[0] <= 'Z')) && 9 raw[1] == ':' && 10 (raw[2] == '\\' || raw[2] == '/') 11 }