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

File system api c++: added support for creating temp. files and directories #1706

Merged
merged 4 commits into from
Nov 18, 2024

Conversation

alamt22
Copy link
Contributor

@alamt22 alamt22 commented Nov 7, 2024

Addresses #1540

This is currently a static method in util/path.cpp for creating a temp file, wrapping it in a File object, and returning it. I am planning on doing one for temporary directories later, wrapping it in a Directory object instead. Let me know if you'd like me to wrap both in Path objects instead--I'm not really sure how to do that since Path takes in a fslike shared pointer rather than the file_like one produced by File.

@heinezen heinezen added improvement Enhancement of an existing component nice new thing ☺ A new feature that was not there before lang: c++ Done in C++ code area: util Utilitis and data structures labels Nov 8, 2024
@alamt22 alamt22 force-pushed the cpp-temp-file-support branch from 1c697a8 to 47e32bc Compare November 9, 2024 19:25
@alamt22 alamt22 changed the title [WIP] file system api c++: added support for creating temp. files #1540 File system api c++: added support for creating temp. files and directories Nov 9, 2024
@alamt22
Copy link
Contributor Author

alamt22 commented Nov 9, 2024

@heinezen I think this should be it for the 2 methods. Whenever you're free, let me know if there's anything else I should consider to improve the code.

@heinezen
Copy link
Member

Thanks, I'll try to review it soon-ish :)

@alamt22
Copy link
Contributor Author

alamt22 commented Nov 13, 2024

Made the requested changes to file.cpp.

@alamt22 alamt22 requested a review from heinezen November 13, 2024 15:33
heinezen
heinezen previously approved these changes Nov 18, 2024
Copy link
Member

@heinezen heinezen left a comment

Choose a reason for hiding this comment

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

Looks good, but you still need to fix the problems indicated by the sanity check.

@alamt22
Copy link
Contributor Author

alamt22 commented Nov 18, 2024

Fixed the sanity check issues.

@heinezen heinezen force-pushed the cpp-temp-file-support branch from fcb97d8 to a144c8c Compare November 18, 2024 21:33
Copy link
Member

@heinezen heinezen left a comment

Choose a reason for hiding this comment

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

I fixed the To file issue and I think we can merge here :)

@heinezen heinezen enabled auto-merge November 18, 2024 21:34
@heinezen heinezen merged commit 19557aa into SFTtech:master Nov 18, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: util Utilitis and data structures improvement Enhancement of an existing component lang: c++ Done in C++ code nice new thing ☺ A new feature that was not there before
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants