feat: file down handle

This commit is contained in:
Noah Hsu
2022-06-28 18:00:11 +08:00
parent d89ec89d51
commit 67bc66fedf
9 changed files with 243 additions and 3 deletions

View File

@ -2,7 +2,9 @@ package fs
import (
"context"
"github.com/alist-org/alist/v3/internal/driver"
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/internal/operations"
log "github.com/sirupsen/logrus"
)
@ -92,3 +94,11 @@ func PutAsTask(dstDirPath string, file model.FileStreamer) error {
}
return err
}
func GetAccount(path string) (driver.Driver, error) {
accountDriver, _, err := operations.GetAccountAndActualPath(path)
if err != nil {
return nil, err
}
return accountDriver, nil
}