c++: address deduction and concepts [CWG2918]
[official-gcc.git] / libgo / go / path / filepath / path_plan9.go
blobec792fc831aefbb77380fa27aef591b2fd1f3430
1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package filepath
7 import "strings"
9 // IsAbs reports whether the path is absolute.
10 func IsAbs(path string) bool {
11 return strings.HasPrefix(path, "/") || strings.HasPrefix(path, "#")
14 // volumeNameLen returns length of the leading volume name on Windows.
15 // It returns 0 elsewhere.
16 func volumeNameLen(path string) int {
17 return 0
20 // HasPrefix exists for historical compatibility and should not be used.
22 // Deprecated: HasPrefix does not respect path boundaries and
23 // does not ignore case when required.
24 func HasPrefix(p, prefix string) bool {
25 return strings.HasPrefix(p, prefix)
28 func splitList(path string) []string {
29 if path == "" {
30 return []string{}
32 return strings.Split(path, string(ListSeparator))
35 func abs(path string) (string, error) {
36 return unixAbs(path)
39 func join(elem []string) string {
40 // If there's a bug here, fix the logic in ./path_unix.go too.
41 for i, e := range elem {
42 if e != "" {
43 return Clean(strings.Join(elem[i:], string(Separator)))
46 return ""
49 func sameWord(a, b string) bool {
50 return a == b