admin/sync: add stat method to importer
This commit is contained in:
parent
57758cd018
commit
db9077a85c
3 changed files with 10 additions and 0 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"errors"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
|
@ -95,3 +96,7 @@ func (i CloudImporter) listDir(filename string) ([]string, error) {
|
|||
return res, nil
|
||||
}
|
||||
}
|
||||
|
||||
func (i CloudImporter) stat(filename string) (os.FileInfo, error) {
|
||||
return gowebdav.NewClient(i.baseDAV.String(), i.username, i.password).Stat(strings.Replace(url.PathEscape(filename), "%2F", "/", -1))
|
||||
}
|
||||
|
|
Reference in a new issue