apache / apache/opendal

new feature: suggestions for `Lister`

Open
#6,272 1 comment 2 reactions 0 assignees View on GitHub
core enhancement releases-note/feat
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

### Feature Description

Thought of a few `Lister` and `Entry` enhancements for your consideration.
(Affects public API)

### Problem and Solution

- `stat` returns `Metadata` which is okay, and `Lister` returns an `Entry` which is path +`Metadata`. But since `Lister` [doesn't guarantee metadata retrieval due to performance implications](https://github.com/apache/opendal/pull/6232#discussion_r2126959344), and Entry should be path +`Option` instead.
- Some user might still be ready for those performance cost, and for this `ListOptions` should have a key `with_metadata: bool` which ensures the metadata retrieval. This way the user decides performance vs results.
(they can still do this with an external `stat` call but user side code simplifies with this simple new option).
- Additionally, `stat` already has some options which might be useful in `Lister` as well (can be pushed down, if backend services support it),
- if_match
- if_none_match
- if_modified_since
- if_unmodified_since
- Suggestions for better naming,
- `deleted` -> `with_deleted`
- `versions` -> `with_versions`

what do you think?

### Additional Context

_No response_

### Are you willing to contribute to the development of this feature?

- [x] Yes, I am willing to contribute to the development of this feature.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the public Lister, Entry, ListOptions, and stat APIs, including the linked discussion about metadata retrieval. Clarify the compatibility and backend-support implications before implementation; done would require an agreed scope for metadata, conditional options, and the proposed naming changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.