isAbs reports whether the path is a Windows absolute path.
(path string)
| 15 | |
| 16 | // isAbs reports whether the path is a Windows absolute path. |
| 17 | func isAbs(path string) (b bool) { |
| 18 | l := volumeNameLen(path) |
| 19 | if l == 0 { |
| 20 | return false |
| 21 | } |
| 22 | path = path[l:] |
| 23 | if path == "" { |
| 24 | return false |
| 25 | } |
| 26 | return isSlash(path[0]) |
| 27 | } |
| 28 | |
| 29 | // volumeNameLen returns length of the leading volume name on Windows. |
| 30 | // It returns 0 elsewhere. |
searching dependent graphs…