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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alamt22
Copy link

@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 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
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 :)

libopenage/util/file.cpp Outdated Show resolved Hide resolved
To Outdated Show resolved Hide resolved
libopenage/util/fslike/directory.h Outdated Show resolved Hide resolved
@alamt22
Copy link
Author

alamt22 commented Nov 13, 2024

Made the requested changes to file.cpp.

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