Better caldav support (#73)
This commit is contained in:
parent
de24fcc2f8
commit
7107d030fc
91 changed files with 7060 additions and 323 deletions
34
vendor/github.com/samedi/caldav-go/files/paths.go
generated
vendored
Normal file
34
vendor/github.com/samedi/caldav-go/files/paths.go
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
package files
|
||||
|
||||
import (
|
||||
"github.com/samedi/caldav-go/lib"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
Separator = string(filepath.Separator)
|
||||
)
|
||||
|
||||
// AbsPath converts the path into absolute path based on the current working directory.
|
||||
func AbsPath(path string) string {
|
||||
path = strings.Trim(path, "/")
|
||||
absPath, _ := filepath.Abs(path)
|
||||
|
||||
return absPath
|
||||
}
|
||||
|
||||
// DirPath returns all but the last element of path, typically the path's directory.
|
||||
func DirPath(path string) string {
|
||||
return filepath.Dir(path)
|
||||
}
|
||||
|
||||
// JoinPaths joins two or more paths into a single path.
|
||||
func JoinPaths(paths ...string) string {
|
||||
return filepath.Join(paths...)
|
||||
}
|
||||
|
||||
// ToSlashPath slashify the path, using '/' as separator.
|
||||
func ToSlashPath(path string) string {
|
||||
return lib.ToSlashPath(path)
|
||||
}
|
||||
Reference in a new issue