rclone/vendor/storj.io/common/storj/path.go

22 lines
429 B
Go
Raw Normal View History

2020-05-11 20:57:46 +02:00
// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
package storj
import (
"strings"
)
// Path represents a object path.
2020-05-11 20:57:46 +02:00
type Path = string
// SplitPath splits path into a slice of path components.
2020-05-11 20:57:46 +02:00
func SplitPath(path Path) []string {
return strings.Split(path, "/")
}
// JoinPaths concatenates paths to a new single path.
2020-05-11 20:57:46 +02:00
func JoinPaths(paths ...Path) Path {
return strings.Join(paths, "/")
}