-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Required Skills: Python or C++
Difficulty: Easy
It would be nice if we could create temporary files/directories in our current file system abstraction API. We currently only use temporary structures in the converter, but they could be useful in other places, e.g. for unzipping archives or on-disk caching.
Creation of temporary files could be implemented in our Python file API or our C++ file API or in both. The Python-side implementation is more preferrable at the moment, since the converter is written Python and temporary files already have an active use case there.
The easiest way to implement support probably is to add a method that calls the underlying system libraries for temporary file/directory creation:
- Python:
tempfile
module - C++:
std::filesystem
andstd::tmpfile
The retrieved path is then wrapped in our Path
/Directory
classes and returned by the method.
Tasks:
- Create temp file/dir and wrap them in openage file system API (Python)
- Create temp file/dir and wrap them in openage file system API (C++)
- Delete temp file/dir explicitely when object is destroyed
- Use new implementation in code (currently only in converter)
- (optional) Add method for checking if a file/dir is temporary
Further Reading
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status