fix(services/fs): make content-length mandatory in list() responses #7072
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Which issue does this PR close?
Partially addresses #7062
Rationale for this change
Issue #7062 proposes making content-length a mandatory return value in list operations across all OpenDAL services. Previously, content-length was handled on a best-effort basis, requiring users to call stat separately when they needed this information. This placed unnecessary burden on users and caused confusion.
This PR starts addressing this issue by implementing mandatory content-length returns in the filesystem service's list operation.
What changes are included in this PR?
Key changes in core/services/fs/src/lister.rs:
Are there any user-facing changes?
Yes - Users of the filesystem service will now always receive content-length information in list responses without needing to make additional stat calls. This improves the API ergonomics and reduces the number of system calls needed to gather complete file information.
This is a non-breaking enhancement - existing code will continue to work, but users can now rely on content-length always being present for filesystem list operations.
AI Usage Statement
No AI has been used