path_other.mx raw
1 //:build baremetal || moxie.wasm || nintendoswitch
2
3 package os
4
5 const (
6 PathSeparator = '/'
7 PathListSeparator = ':'
8 )
9
10 func IsPathSeparator(c uint8) bool {
11 return PathSeparator == c
12 }
13
14 func basename(name string) string {
15 i := len(name) - 1
16 for ; i > 0 && name[i] == '/'; i-- {
17 name = name[:i]
18 }
19 for i--; i >= 0; i-- {
20 if name[i] == '/' {
21 name = name[i+1:]
22 break
23 }
24 }
25 return name
26 }
27
28 func fixRootDirectory(p string) string {
29 return p
30 }
31