OLD | NEW |
1 // Copyright 2010 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package filepath | 5 package filepath |
6 | 6 |
7 import "strings" | 7 import "strings" |
8 | 8 |
9 // IsAbs returns true if the path is absolute. | 9 // IsAbs returns true if the path is absolute. |
10 func IsAbs(path string) bool { | 10 func IsAbs(path string) bool { |
(...skipping 10 matching lines...) Expand all Loading... |
21 func HasPrefix(p, prefix string) bool { | 21 func HasPrefix(p, prefix string) bool { |
22 return strings.HasPrefix(p, prefix) | 22 return strings.HasPrefix(p, prefix) |
23 } | 23 } |
24 | 24 |
25 func splitList(path string) []string { | 25 func splitList(path string) []string { |
26 if path == "" { | 26 if path == "" { |
27 return []string{} | 27 return []string{} |
28 } | 28 } |
29 return strings.Split(path, string(ListSeparator)) | 29 return strings.Split(path, string(ListSeparator)) |
30 } | 30 } |
| 31 |
| 32 func abs(path string) (string, error) { |
| 33 return unixAbs(path) |
| 34 } |
OLD | NEW |