-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing filesystem operations #48
Comments
Is there going to be another |
Yes, there should be a release soon. |
@kaimast version 0.2.0 has been released. |
Thanks! I was talking about the |
Implement the `rename` operation for `fs`. This operation uses `IORING_OP_RENAMEAT` as the opcode for the submitted SQE. Both file descriptors are set to the special value `AT_FDCWD` so that the given paths are interpreted relative to the current working directory of the calling process. The operation is submitted with a zero `flags` argument so that it would be equivalent to the corresponding operation in `tokio:fs`/`std:fs`. Refs: tokio-rs#48
Implement the `rename` operation for `fs`. This operation uses `IORING_OP_RENAMEAT` as the opcode for the submitted SQE. Both file descriptors are set to the special value `AT_FDCWD` so that the given paths are interpreted relative to the current working directory of the calling process. The operation is submitted with a zero `flags` argument so that it would be equivalent to the corresponding operation in `tokio:fs`/`std:fs`. Refs: #48
This adds a `create_dir` function call to `tokio_uring::fs` and partially fixes #48. I also renamed `tests/directory.rs` to `tests/fs_directory.rs` so the name is in sync with that of `tests/fs_file.rs`.
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 |
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 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. |
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 telltokio-uring
only exposesfs::File
right now and none of the ones below are supported yet.Directories:
Files:
Links (I don't really need these but would be great to have):
This should be fairly straightforward to implement, right? I can try to take a stab at some of these once I find some time.
The text was updated successfully, but these errors were encountered: