feat: Add one-shot attribute methods to FileSystemProtocol (Fixes #3648) - #3669
feat: Add one-shot attribute methods to FileSystemProtocol (Fixes #3648)#3669wasim-builds wants to merge 5 commits into
Conversation
glbrntt
left a comment
There was a problem hiding this comment.
This contains changes unrelated to the description; can you remove them? There are also no tests for the changes being made.
829a6fb to
106e3cc
Compare
|
Thanks for the review! I've removed the unrelated commit and added test cases in |
106e3cc to
ba8aeea
Compare
|
Hey @glbrntt! I've rebased the branch to remove the stacked commits — this PR now only contains the FileSystem one-shot attribute methods (with tests). Ready for another look, thanks! |
|
@glbrntt Following up on your review — Ive removed the unrelated changes and added tests covering all three one-shot attribute methods. Could you take another look when you get a chance? |
26e5b2f to
ff6c083
Compare
Hey @weissi! 👋
As discussed in #3648, I've added one-shot APIs to
FileSystemProtocolto make it easier to set file attributes without having to explicitly open and manage a file handle.Implementation Details:
setTimes,setLastAccessTime, andsetLastDataModificationTimeas default extension methods onFileSystemProtocol.withFileHandle(forReadingAt:)so it avoids theO_RDWRAPFS decompression penalty you mentioned.NIOFSand_NIOFileSystem.Let me know if you want any specific unit tests added or if this looks good to go! 🚀