game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
atomic_write.cpp File Reference
#include "util/atomic_write.h"
#include "logger.h"
#include <atomic>
#include <cerrno>
#include <cstring>
#include <filesystem>
#include <fstream>
#include <sstream>
#include <string>
#include <thread>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
Include dependency graph for atomic_write.cpp:

Go to the source code of this file.

Namespaces

namespace  core
namespace  core::anonymous_namespace{atomic_write.cpp}

Functions

bool core::atomicWriteFile (const std::filesystem::path &targetPath, std::string_view contents, std::string *errOut=nullptr)
 Atomically and durably write contents to targetPath.
std::string core::anonymous_namespace{atomic_write.cpp}::buildTempSuffix ()
void core::anonymous_namespace{atomic_write.cpp}::cleanupTempFile (const std::filesystem::path &tmp)
bool core::anonymous_namespace{atomic_write.cpp}::fsyncParentDir (const std::filesystem::path &target)

Variables

std::atomic< uint64_t > core::anonymous_namespace{atomic_write.cpp}::g_atomicWriteCounter {0}