userver: userver/fs/blocking/write.hpp File Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
write.hpp File Reference

Functions for synchronous (blocking) file write operations. More...

#include <string>
#include <string_view>
#include <boost/filesystem/operations.hpp>
+ Include dependency graph for write.hpp:

Go to the source code of this file.

Namespaces

namespace  fs
 filesystem support
 
namespace  fs::blocking
 blocking function and classes to work with filesystem
 

Functions

void fs::blocking::RewriteFileContents (const std::string &path, std::string_view contents)
 Rewrite file contents synchronously.
 
void fs::blocking::SyncDirectoryContents (const std::string &path)
 flushes directory contents on disk using sync(2)
 
void fs::blocking::Rename (const std::string &source, const std::string &destination)
 Renames existing file synchronously.
 
void fs::blocking::Chmod (const std::string &path, boost::filesystem::perms perms)
 Change file mode synchronously.
 
bool fs::blocking::RemoveSingleFile (const std::string &path)
 Remove existing file synchronously.
 
void fs::blocking::CreateDirectories (std::string_view path, boost::filesystem::perms perms)
 Create directory and all necessary parent elements. Condition when path already exists and is a directory treated as "success" and no exception is thrown.
 
void fs::blocking::CreateDirectories (std::string_view path)
 

Detailed Description

Functions for synchronous (blocking) file write operations.

Definition in file write.hpp.