Skip to content

Why does the listing of an Aliyun OSS dir only contain last_modified meta when recursive is true? #5215

Answered by Xuanwo
photino asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, in most object storage services, directories are merely treated as a simple prefix ending with '/'. However, when users manually create 'abc/', the behavior may vary.

For list with recursive(false), we call object storage services using ListObjects with delimiter = "/". In this scenario, all paths that end with / are displayed in CommonPrefixes as plain strings without metadata.

For list with recursive(true), we call object storage services using ListObjects with delimiter = "". Here, all keys are listed in Contents along with their corresponding metadata. It's important to note that abc/ is treated as a normal object in this context, and is only converted into a directory because …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@photino
Comment options

Answer selected by photino
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants