2022-06-10 17:26:43 +08:00
|
|
|
package fs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"github.com/alist-org/alist/v3/internal/driver"
|
|
|
|
"github.com/alist-org/alist/v3/internal/operations"
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Get(ctx context.Context, path string) (driver.FileInfo, error) {
|
|
|
|
account, actualPath, err := operations.GetAccountAndActualPath(path)
|
|
|
|
if err != nil {
|
|
|
|
return nil, errors.WithMessage(err, "failed get account")
|
|
|
|
}
|
2022-06-10 20:20:45 +08:00
|
|
|
return operations.Get(ctx, account, actualPath)
|
2022-06-10 17:26:43 +08:00
|
|
|
}
|