(path string, rootLength int)
| 136 | } |
| 137 | |
| 138 | func pathComponents(path string, rootLength int) []string { |
| 139 | root := path[:rootLength] |
| 140 | rest := strings.Split(path[rootLength:], "/") |
| 141 | if len(rest) > 0 && rest[len(rest)-1] == "" { |
| 142 | rest = rest[:len(rest)-1] |
| 143 | } |
| 144 | return append([]string{root}, rest...) |
| 145 | } |
| 146 | |
| 147 | func IsVolumeCharacter(char byte) bool { |
| 148 | return char >= 'a' && char <= 'z' || char >= 'A' && char <= 'Z' |
no test coverage detected