Public Member Functions | |
| AtomicFile (const fs::path &destination) | |
| ~AtomicFile () | |
| Remove abandoned staging data without removing committed output. | |
| void | write (const void *data, size_t length) |
| void | text (const std::string &value) |
| Append serialized text without adding a terminator or newline. | |
| void | commit () |
Data Fields | |
| fs::path | target |
| fs::path | temporary |
| File | file |
Detailed Description
Same-directory temporary file committed with fsync+rename for crash-safe checkpoints. Same-directory temporary output committed with flush, fsync, rename, and directory fsync.
Definition at line 550 of file pangea.cpp.
Constructor & Destructor Documentation
◆ AtomicFile()
|
inlineexplicit |
- Parameters
-
destination Final path; its parent directory must already exist.
Definition at line 554 of file pangea.cpp.
◆ ~AtomicFile()
|
inline |
Remove abandoned staging data without removing committed output.
Definition at line 567 of file pangea.cpp.
Member Function Documentation
◆ commit()
|
inline |
Durably publish the complete temporary file at target.
Definition at line 579 of file pangea.cpp.
◆ text()
|
inline |
Append serialized text without adding a terminator or newline.
- Parameters
-
value Exact bytes to append.
Definition at line 577 of file pangea.cpp.
◆ write()
|
inline |
Append exact bytes to the temporary output.
Definition at line 571 of file pangea.cpp.
Field Documentation
◆ file
| File pangea_detail::AtomicFile::file |
Definition at line 552 of file pangea.cpp.
◆ target
| fs::path pangea_detail::AtomicFile::target |
Definition at line 551 of file pangea.cpp.
◆ temporary
| fs::path pangea_detail::AtomicFile::temporary |
Definition at line 551 of file pangea.cpp.
The documentation for this struct was generated from the following file:
- modules/pangea/pangea.cpp