![]() |
NDEVR
API Documentation
|
Manages temporary file paths during an IOFactory write operation, ensuring safe writes by writing to temporary files first and then moving them to the final destination. More...
Public Member Functions | |
| TemporaryIOFileLocker (FactoryParameters ¶ms) | |
| Constructs the locker, replacing file paths in params with temporary paths. | |
| ~TemporaryIOFileLocker () | |
| Destructor. | |
| Buffer< std::pair< File, File > > | writeToActual () |
| Moves all temporary files to their actual (final) destinations. | |
Protected Attributes | |
| Dictionary< String, FileRequest > | m_original_requests |
| The original file requests before temporary path substitution. | |
| FactoryParameters & | m_params |
| Reference to the FactoryParameters being managed. | |
Manages temporary file paths during an IOFactory write operation, ensuring safe writes by writing to temporary files first and then moving them to the final destination.
When constructed, the locker replaces the file paths in the FactoryParameters with temporary paths. On writeToActual(), the temporary files are moved to their intended locations. The destructor cleans up any remaining temporary files if writeToActual() was not called.
Definition at line 206 of file IOFactory.h.
| TemporaryIOFileLocker::TemporaryIOFileLocker | ( | FactoryParameters & | params | ) |
Constructs the locker, replacing file paths in params with temporary paths.
| [in] | params | The FactoryParameters whose file paths will be redirected to temporary files. |
| TemporaryIOFileLocker::~TemporaryIOFileLocker | ( | ) |
Destructor.
Cleans up temporary files and restores original file paths in the parameters.
Moves all temporary files to their actual (final) destinations.