zhan7236 opened a new pull request, #7061:
URL: https://github.com/apache/opendal/pull/7061
# Which issue does this PR close?
Part of #4842.
# Rationale for this change
Issue #4842 tracks adding user defined metadata support for various
services. This PR implements user metadata support for the `fs` service using
extended attributes (xattr) on Unix systems.
# What changes are included in this PR?
- Add `xattr` crate dependency for Unix platforms
- Enable `write_with_user_metadata` capability in the fs backend
- Implement `get_user_metadata()` and `set_user_metadata()` methods using
xattr
- Update `FsWriter` to store and write user metadata when closing files
- Update `fs_stat()` to read user metadata from xattr
User metadata is stored as extended attributes with the prefix
`user.opendal.` on the filesystem.
# Are there any user-facing changes?
Yes. Users can now use `op.write_with("path", data).user_metadata(metadata)`
to store custom metadata with files on the `fs` service (Unix only).
# AI Usage Statement
This PR was developed with assistance from GitHub Copilot using Claude Opus
4.5.
--
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]