Skip to content

"is_regular_file" for file trait + integration test #475

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

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

phip1611
Copy link
Member

@phip1611 phip1611 commented Jul 31, 2022

This MR adds the "is_regular_file" and "is_regular_directory"-methods for the File-trait which is especially useful if you work with the generic FileHandle abstraction.

Furthermore, it splits up the existing integration test a little for a clearer separation of concerns. The simple file system protocol test now tests creating a file in the root volume. On this file, I test my newly created additions.

Additionally, FileHandle::into_type now returns a direct value instead of a Result. If we have a failure there, it is a hard-bug in the uefi-rs lib and not something the user should take care of.

@phip1611 phip1611 force-pushed the is-file-is-directory branch 2 times, most recently from 88dbcc1 to 3018cfb Compare July 31, 2022 15:06
@phip1611 phip1611 changed the title "is_regular_file" for file trait + integration test "is_regular_file" for file trait and FileHandle::into_type() no longer returns a result + integration test Jul 31, 2022
@phip1611 phip1611 force-pushed the is-file-is-directory branch from 147343c to 2c12656 Compare July 31, 2022 15:44
@phip1611
Copy link
Member Author

phip1611 commented Aug 3, 2022

Short notice: I'm currently on vacation and probably won't work on the PRs until the last week of August

@phip1611 phip1611 force-pushed the is-file-is-directory branch from 2c12656 to 2bf06d5 Compare August 27, 2022 12:48
@phip1611 phip1611 requested a review from GabrielMajeri August 27, 2022 12:48
@phip1611
Copy link
Member Author

This is ready for the next review round.

@phip1611 phip1611 changed the title "is_regular_file" for file trait and FileHandle::into_type() no longer returns a result + integration test "is_regular_file" for file trait + simple file system protocol integration test Aug 27, 2022
@phip1611 phip1611 force-pushed the is-file-is-directory branch from 2bf06d5 to 8f009c0 Compare September 1, 2022 13:40
@phip1611 phip1611 force-pushed the is-file-is-directory branch from 8f009c0 to 83ade2e Compare September 6, 2022 15:43
@phip1611 phip1611 changed the title "is_regular_file" for file trait + simple file system protocol integration test "is_regular_file" for file trait + integration test Sep 6, 2022
@phip1611 phip1611 changed the title "is_regular_file" for file trait + integration test Draft: "is_regular_file" for file trait + integration test Sep 6, 2022
@phip1611 phip1611 self-assigned this Sep 6, 2022
@phip1611 phip1611 force-pushed the is-file-is-directory branch 2 times, most recently from 759588f to e20ba60 Compare September 6, 2022 17:04
@phip1611 phip1611 removed their assignment Sep 6, 2022
@phip1611 phip1611 changed the title Draft: "is_regular_file" for file trait + integration test "is_regular_file" for file trait + integration test Sep 6, 2022
@phip1611 phip1611 force-pushed the is-file-is-directory branch from e20ba60 to eb2659c Compare September 6, 2022 17:06
This is necessary as preparation for the integration test.
@phip1611 phip1611 force-pushed the is-file-is-directory branch from eb2659c to 38d7eae Compare September 6, 2022 17:06
@phip1611
Copy link
Member Author

phip1611 commented Sep 6, 2022

Ready for another review round @nicholasbishop

@phip1611 phip1611 force-pushed the is-file-is-directory branch from 38d7eae to f8bd537 Compare September 6, 2022 17:12
@phip1611 phip1611 force-pushed the is-file-is-directory branch from f8bd537 to 09b01a9 Compare September 6, 2022 17:13
@nicholasbishop nicholasbishop merged commit cd52e71 into rust-osdev:main Sep 6, 2022
@phip1611 phip1611 deleted the is-file-is-directory branch September 6, 2022 18:31
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.

3 participants