mirror of
https://github.com/rclone/rclone.git
synced 2024-12-03 05:54:10 +08:00
22 lines
426 B
Go
22 lines
426 B
Go
|
// Copyright (C) 2019 Storj Labs, Inc.
|
||
|
// See LICENSE for copying information.
|
||
|
|
||
|
package storj
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
)
|
||
|
|
||
|
// Path represents a object path
|
||
|
type Path = string
|
||
|
|
||
|
// SplitPath splits path into a slice of path components
|
||
|
func SplitPath(path Path) []string {
|
||
|
return strings.Split(path, "/")
|
||
|
}
|
||
|
|
||
|
// JoinPaths concatenates paths to a new single path
|
||
|
func JoinPaths(paths ...Path) Path {
|
||
|
return strings.Join(paths, "/")
|
||
|
}
|