tokio-uring
tokio-uring copied to clipboard
Add missing filesystem operations
It would be great if we could add the most important functions from tokio::fs/std::fs to this crate. As far as I can tell tokio-uring only exposes fs::File right now and none of the ones below are supported yet.
Directories:
- [x] create_dir
- [ ] read_dir
- [x] remove_dir
- [ ] remove_dir_all
Files:
- [ ] metadata
- [x] rename
- [ ] copy
- [x] remove_file
Links (I don't really need these but would be great to have):
- [ ] symlink_metadata
- [ ] soft_link
- [ ] hard_link
- [ ] read_link
This should be fairly straightforward to implement, right? I can try to take a stab at some of these once I find some time.
Is there going to be another io-uring release soonish? I just added a create_dir call on this branch, but it requires the git version of that crate.
Yes, there should be a release soon.
@kaimast version 0.2.0 has been released.
Thanks! I was talking about the io-uring crate though.
We should maybe keep this open until the others are implemented too?
That close seemed to have been done automatically. Anyway, no harm. Definitely some file system operations left.
Is tokio::fs::canonicalize also an operation we can support?
Is
tokio::fs::canonicalizealso an operation we can support?
The io_uring API doesn't support anything like a canonicalize (or in Unix terms, a realpath) so to avoid using the std or the tokio canonicalize, this crate, or just as easily I think, a 3rd party package, could build the logic from this crate's StatxBuilder.
That's not to say we wouldn't accept a PR that essentially duplicated a realpath based on our statx. But any suggested additions would have to be compatible with our license and I don' know if even starting with a BSD version of realpath is an acceptable approach.
I understand. Thanks.