tstor/src/host/vfs/utils.go
2023-10-18 12:52:48 +03:00

14 lines
235 B
Go

package vfs
import (
"path"
"strings"
)
func trimRelPath(p, t string) string {
return strings.Trim(strings.TrimPrefix(p, t), "/")
}
func clean(p string) string {
return path.Clean(Separator + strings.ReplaceAll(p, "\\", "/"))
}