You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/05/10 06:37:45 UTC
(opendal) branch main updated: feat(core): expose metadata access for raw list entries (#7493)
This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 179031f05 feat(core): expose metadata access for raw list entries (#7493)
179031f05 is described below
commit 179031f05f7942b498d61f25f7b5e65a790dba37
Author: Gergely Nagy <ng...@users.noreply.github.com>
AuthorDate: Sun May 10 08:37:39 2026 +0200
feat(core): expose metadata access for raw list entries (#7493)
Expose `oio::Entry::metadata`, `metadata_mut`, and `into_parts` so layers
can inspect or rewrite list entry metadata without issuing extra stat requests.
Closes #7484
---
core/core/src/raw/oio/entry.rs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/core/core/src/raw/oio/entry.rs b/core/core/src/raw/oio/entry.rs
index 34d64bc7e..350bd92ae 100644
--- a/core/core/src/raw/oio/entry.rs
+++ b/core/core/src/raw/oio/entry.rs
@@ -88,12 +88,17 @@ impl Entry {
}
/// Get metadata of entry.
- pub(crate) fn metadata(&self) -> &Metadata {
+ pub fn metadata(&self) -> &Metadata {
&self.meta
}
/// Get mutable metadata of entry.
- pub(crate) fn metadata_mut(&mut self) -> &mut Metadata {
+ pub fn metadata_mut(&mut self) -> &mut Metadata {
&mut self.meta
}
+
+ /// Consume this entry to get its path and metadata.
+ pub fn into_parts(self) -> (String, Metadata) {
+ (self.path, self.meta)
+ }
}