admin: Export more importer functions

This commit is contained in:
nemunaire 2023-11-25 17:13:31 +01:00
commit 1f833d39fc
7 changed files with 26 additions and 26 deletions

View file

@ -77,7 +77,7 @@ func (i CloudImporter) importFile(URI string, next func(string, string) (interfa
return ImportFile(i, URI, next)
}
func (i CloudImporter) getFile(filename string) (io.Reader, error) {
func (i CloudImporter) GetFile(filename string) (io.Reader, error) {
fullURL := i.baseDAV
fullURL.Path = path.Join(fullURL.Path, filename)
@ -122,7 +122,7 @@ func (i CloudImporter) writeFile(filename string, reader io.Reader) error {
}
}
func (i CloudImporter) listDir(filename string) ([]string, error) {
func (i CloudImporter) ListDir(filename string) ([]string, error) {
client := gowebdav.NewClient(i.baseDAV.String(), i.username, i.password)
if files, err := client.ReadDir(strings.Replace(url.PathEscape(filename), "%2F", "/", -1)); err != nil {
@ -136,6 +136,6 @@ func (i CloudImporter) listDir(filename string) ([]string, error) {
}
}
func (i CloudImporter) stat(filename string) (os.FileInfo, error) {
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))
}