...
1
2
3
4
5 package filepath
6
7 import (
8 "strings"
9 )
10
11
12
13
14
15 func HasPrefix(p, prefix string) bool {
16 return strings.HasPrefix(p, prefix)
17 }
18
19 func splitList(path string) []string {
20 if path == "" {
21 return []string{}
22 }
23 return strings.Split(path, string(ListSeparator))
24 }
25
26 func abs(path string) (string, error) {
27 return unixAbs(path)
28 }
29
30 func join(elem []string) string {
31
32 for i, e := range elem {
33 if e != "" {
34 return Clean(strings.Join(elem[i:], string(Separator)))
35 }
36 }
37 return ""
38 }
39
40 func sameWord(a, b string) bool {
41 return a == b
42 }
43
View as plain text