Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
pangea_detail::AtomicFile Struct Reference

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()

pangea_detail::AtomicFile::AtomicFile ( const fs::path & destination)
inlineexplicit
Parameters
destinationFinal path; its parent directory must already exist.

Definition at line 554 of file pangea.cpp.

◆ ~AtomicFile()

pangea_detail::AtomicFile::~AtomicFile ( )
inline

Remove abandoned staging data without removing committed output.

Definition at line 567 of file pangea.cpp.

Member Function Documentation

◆ commit()

void pangea_detail::AtomicFile::commit ( )
inline

Durably publish the complete temporary file at target.

Definition at line 579 of file pangea.cpp.

◆ text()

void pangea_detail::AtomicFile::text ( const std::string & value)
inline

Append serialized text without adding a terminator or newline.

Parameters
valueExact bytes to append.

Definition at line 577 of file pangea.cpp.

◆ write()

void pangea_detail::AtomicFile::write ( const void * data,
size_t length )
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: