You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudreve/pkg/util/path.go

18 lines
328 B

package util
import "strings"
// DotPathToStandardPath 将","分割的路径转换为标准路径
func DotPathToStandardPath(path string) string {
return "/" + strings.Replace(path, ",", "/", -1)
}
// FillSlash 给路径补全`/`
func FillSlash(path string) string {
if path == "/" {
return path
}
return path + "/"
}