mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
35 lines
779 B
Go
35 lines
779 B
Go
|
// Copyright 2010 The Go Authors. All rights reserved.
|
||
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
//go:build unix || (js && wasm)
|
||
|
|
||
|
package downloader
|
||
|
|
||
|
import "strings"
|
||
|
|
||
|
func isLocal(path string) bool {
|
||
|
return unixIsLocal(path)
|
||
|
}
|
||
|
|
||
|
// IsAbs reports whether the path is absolute.
|
||
|
func IsAbs(path string) bool {
|
||
|
return strings.HasPrefix(path, "/")
|
||
|
}
|
||
|
|
||
|
// volumeNameLen returns length of the leading volume name on Windows.
|
||
|
// It returns 0 elsewhere.
|
||
|
func volumeNameLen(path string) int {
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func join(elem []string) string {
|
||
|
// If there's a bug here, fix the logic in ./path_plan9.go too.
|
||
|
for i, e := range elem {
|
||
|
if e != "" {
|
||
|
return Clean(strings.Join(elem[i:], string(Separator)))
|
||
|
}
|
||
|
}
|
||
|
return ""
|
||
|
}
|