github.com/ledgerwatch/erigon-lib@v1.0.0/downloader/path_unix.go (about) 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. 4 5 //go:build unix || (js && wasm) 6 7 package downloader 8 9 import "strings" 10 11 func isLocal(path string) bool { 12 return unixIsLocal(path) 13 } 14 15 // IsAbs reports whether the path is absolute. 16 func IsAbs(path string) bool { 17 return strings.HasPrefix(path, "/") 18 } 19 20 // volumeNameLen returns length of the leading volume name on Windows. 21 // It returns 0 elsewhere. 22 func volumeNameLen(path string) int { 23 return 0 24 } 25 26 func join(elem []string) string { 27 // If there's a bug here, fix the logic in ./path_plan9.go too. 28 for i, e := range elem { 29 if e != "" { 30 return Clean(strings.Join(elem[i:], string(Separator))) 31 } 32 } 33 return "" 34 }