userver: userver/fs/blocking/write.hpp File Reference
Loading...
Searching...
No Matches
write.hpp File Reference

Detailed Description

Functions for synchronous (blocking) file write operations.

Definition in file 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::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)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
void fs::blocking::RewriteFileContents (utils::zstring_view path, std::string_view contents)
 Rewrite file contents synchronously.
 
void fs::blocking::RewriteFileContentsFSync (utils::zstring_view path, std::string_view contents)
 Rewrite file contents synchronously and call fsync
 
void fs::blocking::SyncDirectoryContents (utils::zstring_view path)
 flushes directory contents on disk using sync(2)
 
void fs::blocking::Rename (utils::zstring_view source, utils::zstring_view destination)
 Renames existing file synchronously.
 
void fs::blocking::RewriteFileContentsAtomically (utils::zstring_view path, std::string_view contents, boost::filesystem::perms perms)
 Rewrite file contents atomically.
 
void fs::blocking::Chmod (utils::zstring_view path, boost::filesystem::perms perms)
 Change file mode synchronously.
 
bool fs::blocking::RemoveSingleFile (utils::zstring_view path)
 Remove existing file synchronously.