1
0
Fork 0
mirror of https://github.com/vbatts/srvdav.git synced 2024-11-25 09:55:40 +00:00
srvdav/vendor/github.com/samedi/caldav-go/files/paths.go

30 lines
484 B
Go

package files
import (
"strings"
"path/filepath"
"github.com/samedi/caldav-go/lib"
)
const (
Separator = string(filepath.Separator)
)
func AbsPath(path string) string {
path = strings.Trim(path, "/")
absPath, _ := filepath.Abs(path)
return absPath
}
func DirPath(path string) string {
return filepath.Dir(path)
}
func JoinPaths(paths ...string) string {
return filepath.Join(paths...)
}
func ToSlashPath(path string) string {
return lib.ToSlashPath(path)
}