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