GitHub user Xuanwo added a comment to the discussion: Why does the listing of an Aliyun OSS dir only contain `last_modified` meta when `recursive` is true?
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 it ends with `/`. It seems unfair to stat `abc/` again when calling `list` with `recursive(false)`, as this could potentially slow down the listing performance by up to 1000 times. Therefore, we choose to ignore them. Technically, possessing the `last_modified` metadata for a directory is meaningless. Do you have specific requirements for this? ref: https://help.aliyun.com/zh/oss/developer-reference/listobjectsv2?spm=a2c4g.11186623.0.0.63df4d4dvUvPLd GitHub link: https://github.com/apache/opendal/discussions/5215#discussioncomment-11000573 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
