Skip to content
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

tokio-fs: Add async versions of most of std::fs #494

Merged
merged 13 commits into from Aug 1, 2018

Conversation

griff
Copy link
Contributor

@griff griff commented Jul 19, 2018

tokio-fs was missing most of the the functions defined in std::fs so this pull request simple adds most of them with implementations based on metadata.

I have added each function as its own commit so that the commits are very simple and easy to read.

@carllerche
Copy link
Member

Excellent job 👍. I will schedule time to review this today.

@carllerche
Copy link
Member

Looks great. Unfortunately, Tokio still needs to support slightly older Rust versions. Would you mind updating the doc tests to avoid using fn main() -> Result ... . Thanks!

@lnicola
Copy link
Contributor

lnicola commented Jul 25, 2018

These should be exposed from tokio::fs as well. See #479, same for #488.

@griff
Copy link
Contributor Author

griff commented Jul 25, 2018

@carllerche I have updated the read_dir doc test to not use fn main() -> Result ... and also got the tests to actually work.

@lnicola the functions are now exported under tokio::fs. But #488 is not relevant in that regard since it simply implements existing traits found in std::os on tokio_fs::file::File

mod symlink_dir;
mod symlink_file;

pub use symlink_dir::{symlink_dir, SymlinkDirFuture};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing self::, maybe? This failed on AppVeyor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was two missing self::

@carllerche
Copy link
Member

@griff 👍 Just need to get it to pass on Appveyor. @lnicola had a thought as to why it isn't passing above.

@griff
Copy link
Contributor Author

griff commented Jul 31, 2018

@carllerche @lnicola I have fixed the missing self:: and rebased the commits so they are up to date with master

Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Great, thanks!

@carllerche carllerche merged commit 0490280 into tokio-rs:master Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants