package files
import (
"net/url"
"strings"
)
func CurrentPath(path string) (curPath string) {
parts := strings.Split(path, "/")[1:]
curPath = "root"
for i, part := range parts {
var sb strings.Builder
sb.WriteString("/")
sb.WriteString(url.PathEscape(part))
sb.WriteString("")
curPath += sb.String()
}
return
}