5#include <boost/filesystem/operations.hpp>
7#include <userver/fs/blocking/c_file.hpp>
8#include <userver/utils/cpu_relax.hpp>
9#include <userver/utils/fast_pimpl.hpp>
11#include <userver/dump/factory.hpp>
12#include <userver/dump/operations.hpp>
14USERVER_NAMESPACE_BEGIN
19class FileWriter
final :
public Writer {
28 void WriteRaw(std::string_view data)
override;
31 std::string final_path_;
33 boost::filesystem::perms perms_;
38class FileReader
final :
public Reader {
47 std::string_view ReadRaw(std::size_t max_size)
override;
51 std::string curr_chunk_;
56 explicit FileOperationsFactory(boost::filesystem::perms perms);
58 std::unique_ptr<Reader> CreateReader(std::string full_path)
override;
60 std::unique_ptr<Writer> CreateWriter(std::string full_path, tracing::ScopeTime& scope)
override;
63 const boost::filesystem::perms perms_;