mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-27 01:51:56 +08:00
Feat: List files in COS bucket
This commit is contained in:
@@ -110,15 +110,19 @@ func (handler Driver) List(ctx context.Context, base string, recursive bool) ([]
|
||||
|
||||
// 列取文件
|
||||
base = strings.TrimPrefix(base, "/")
|
||||
delimiter := ""
|
||||
if base != "" {
|
||||
base += "/"
|
||||
}
|
||||
|
||||
var (
|
||||
delimiter string
|
||||
marker string
|
||||
objects []oss.ObjectProperties
|
||||
commons []string
|
||||
)
|
||||
if !recursive {
|
||||
delimiter = "/"
|
||||
}
|
||||
marker := ""
|
||||
var (
|
||||
objects []oss.ObjectProperties
|
||||
commons []string
|
||||
)
|
||||
|
||||
for {
|
||||
subRes, err := handler.bucket.ListObjects(oss.Marker(marker), oss.Prefix(base),
|
||||
|
||||
Reference in New Issue
Block a user