feat: add root prefix before operate

This commit is contained in:
Noah Hsu
2022-06-10 20:20:45 +08:00
parent 354dee67dc
commit cd7e9974df
9 changed files with 49 additions and 11 deletions

18
internal/operations/fs.go Normal file
View File

@ -0,0 +1,18 @@
package operations
import (
"context"
"github.com/alist-org/alist/v3/internal/driver"
)
// In order to facilitate adding some other things before and after file operations
// List files in storage, not contains virtual file
// TODO: cache, and prevent cache breakdown
func List(ctx context.Context, account driver.Driver, path string) ([]driver.FileInfo, error) {
return account.List(ctx, path)
}
func Get(ctx context.Context, account driver.Driver, path string) (driver.FileInfo, error) {
return account.Get(ctx, path)
}