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