userver: userver/fs/write.hpp Source File
Loading...
Searching...
No Matches
write.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <filesystem>
7#include <string>
8#include <string_view>
9
11
12USERVER_NAMESPACE_BEGIN
13
14namespace fs {
15
25void CreateDirectories(engine::TaskProcessor& async_tp, std::string_view path, std::filesystem::perms perms);
26
27void CreateDirectories(engine::TaskProcessor& async_tp, std::string_view path);
29
37void RewriteFileContents(engine::TaskProcessor& async_tp, const std::string& path, std::string_view contents);
38
45void RewriteFileContents(const std::string& path, std::string_view contents);
46
52void Rename(engine::TaskProcessor& async_tp, const std::string& source, const std::string& destination);
53
67 engine::TaskProcessor& async_tp,
68 const std::string& path,
69 std::string_view contents,
70 std::filesystem::perms perms,
71 std::filesystem::perm_options options = std::filesystem::perm_options::replace
72);
73
81void Chmod(
82 engine::TaskProcessor& async_tp,
83 const std::string& path,
84 std::filesystem::perms perms,
85 std::filesystem::perm_options options = std::filesystem::perm_options::replace
86);
87
93bool RemoveSingleFile(engine::TaskProcessor& async_tp, const std::string& path);
94
95} // namespace fs
96
97USERVER_NAMESPACE_END