libgo: Update to Go 1.1.1.
[official-gcc.git] / libgo / go / path / filepath / path_plan9.go
blob12e85aae00c8de51e5dbefa9705db724dcbb1572
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 returns true if 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.
21 func HasPrefix(p, prefix string) bool {
22 return strings.HasPrefix(p, prefix)
25 func splitList(path string) []string {
26 if path == "" {
27 return []string{}
29 return strings.Split(path, string(ListSeparator))