feat(bindings/python): Enhance Stat, Lister, Metadata & Entry #6232
feat(bindings/python): Enhance Stat, Lister, Metadata & Entry #6232Xuanwo merged 17 commits intoapache:mainfrom
Conversation
|
@Xuanwo @asukaminato0721 all your suggestions have been included now,. |
691afbb to
50255f4
Compare
|
Added options to stat as well and updated PR description. |
|
@Xuanwo @asukaminato0721 Please let me know if there's anything else pending before merging this. |
Co-authored-by: Nadeshiko Manju <[email protected]>
core/src/services/fs/lister.rs
Outdated
| (&rel_path, EntryMode::Unknown) | ||
| }; | ||
|
|
||
| let meta = tokio::fs::metadata(self.root.join(path)) |
There was a problem hiding this comment.
Hi, please don't change this. This will make the list run several times slower than before. Users who need content_length should call stat themselves. There is no guarantee that the list can retrieve metadata for all services.
There was a problem hiding this comment.
okay, i understand, let me revert this.
There is no guarantee that the list can retrieve metadata for all services.
may be this can be a note somewhere in core on the Lister/ list() ?
There was a problem hiding this comment.
may be this can be a note somewhere in
coreon the Lister/ list() ?
Yes, I agree that we should document that list does not return the complete metadata for a file.
Xuanwo
left a comment
There was a problem hiding this comment.
Thank you @chitralverma for working on this and thank you @asukaminato0721 for the review!
Which issue does this PR close?
None
Rationale for this change
Lister, Metadata & Entry in python bindings had some missing capabilities, this PR adds them.
What changes are included in this PR?
MetadatatoEntrywhich was missingMetadatalist&scanscanas list with recursive = TruestatstatAre there any user-facing changes?
Yes, new things are added to Entry, Metadata and list/ scan/ stat functions.