![]() |
OpenSWMM Engine
6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
|
#include <CheckpointDirectory.hpp>
Public Member Functions | |
| CheckpointDirectory (std::filesystem::path destination) | |
| Reserve an exclusive sibling directory for a checkpoint bundle. | |
| ~CheckpointDirectory () | |
| Recursively remove the owned staging directory if not published. | |
| CheckpointDirectory (const CheckpointDirectory &)=delete | |
| CheckpointDirectory & | operator= (const CheckpointDirectory &)=delete |
| const std::filesystem::path & | staging () const |
| Expose the reserved private directory for writing bundle contents. | |
| void | publish () |
| Publish the complete reserved bundle by exclusive rename. | |
Own an exclusively created private directory. Publish the complete bundle without replacing an existing destination, including an empty directory.
|
explicit |
Reserve an exclusive sibling directory for a checkpoint bundle.
| [in] | destination | Final bundle path, which must not already exist. The parent must exist and allow creation of a sibling staging directory. |
| std::runtime_error | The destination exists or 32 reservation attempts fail. |
| std::filesystem::filesystem_error | Filesystem inspection or creation fails. |
The instance owns its newly created staging directory until publish() succeeds; destruction recursively removes an unpublished bundle.
| openswmm::io::CheckpointDirectory::~CheckpointDirectory | ( | ) |
Recursively remove the owned staging directory if not published.
|
delete |
|
delete |
| void openswmm::io::CheckpointDirectory::publish | ( | ) |
Publish the complete reserved bundle by exclusive rename.
| std::runtime_error | Staging ownership was already released or exclusive publication fails. Filesystem failures may also propagate. |
|
inline |
Expose the reserved private directory for writing bundle contents.