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