Xuanwo commented on code in PR #5226:
URL: https://github.com/apache/opendal/pull/5226#discussion_r1811700128
##########
core/src/services/gdrive/lister.rs:
##########
@@ -64,10 +83,32 @@ impl oio::PageList for GdriveLister {
return Ok(());
}
+ let stat_file_metadata = !self
+ .op
+ .metakey()
+ .is_disjoint(Metakey::ContentLength | Metakey::LastModified);
+
// Return self at the first page.
if ctx.token.is_empty() && !ctx.done {
let path = build_rel_path(&self.core.root, &self.path);
- let e = oio::Entry::new(&path, Metadata::new(EntryMode::DIR));
+ let mut metadata = Metadata::new(EntryMode::DIR);
+ if stat_file_metadata {
Review Comment:
Hi, sorry for not making the `Metakey` behavior clearer. (I'm working on
this.)
Metakey represents a best effort hint and is not processed server-side. The
service merely needs to supply the most comprehensive metadata available during
listing.
The `Operator` will call `stat` as required, for example:
https://github.com/apache/opendal/blob/5e074cc49bc7662c790d88fb9be31e7c67899d64/core/src/types/list.rs#L150-L211
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]