12345678910111213141516171819202122232425262728293031 |
- package main
- import (
- "strings"
- "github.com/studio-b12/gowebdav"
- )
- //remote 路径
- func isExists(client *gowebdav.Client, remote string) bool {
- // 检查文件夹是否存在
- if _, err := client.Stat(remote); err != nil {
- return false
- } else {
- return true
- }
- return false
- }
- //替换换行
- func Replace_hh(str string) string {
- return strings.Replace(strings.TrimSpace(str), "\n", "", -1)
- }
- func Replace_path(remotePath string) string {
- remotePath = strings.ReplaceAll(remotePath, `\`, `/`)
- return remotePath
- }
|