1
2
3
4
5 package filepathlite
6
7 import (
8 "internal/bytealg"
9 "internal/stringslite"
10 )
11
12 const (
13 Separator = '/'
14 ListSeparator = '\000'
15 )
16
17 func IsPathSeparator(c uint8) bool {
18 return Separator == c
19 }
20
21 func isLocal(path string) bool {
22 return unixIsLocal(path)
23 }
24
25 func localize(path string) (string, error) {
26 if path[0] == '#' || bytealg.IndexByteString(path, 0) >= 0 {
27 return "", errInvalidPath
28 }
29 return path, nil
30 }
31
32
33 func IsAbs(path string) bool {
34 return stringslite.HasPrefix(path, "/") || stringslite.HasPrefix(path, "#")
35 }
36
37
38
39 func volumeNameLen(path string) int {
40 return 0
41 }
42
View as plain text