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