userver: userver/fs/blocking/write.hpp Source File
Loading...
Searching...
No Matches
write.hpp
Go to the documentation of this file.
1#pragma once
2
6
7#include <filesystem>
8#include <string_view>
9
11
12USERVER_NAMESPACE_BEGIN
13
14namespace fs::blocking {
15
22void CreateDirectories(std::string_view path, std::filesystem::perms perms);
23
25void CreateDirectories(std::string_view path);
26
32void RewriteFileContents(utils::zstring_view path, std::string_view contents);
33
49void RewriteFileContentsFSync(utils::zstring_view path, std::string_view contents);
50
54
60
76 std::string_view contents,
77 std::filesystem::perms perms,
78 std::filesystem::perm_options options = std::filesystem::perm_options::replace
79);
80
87void Chmod(
89 std::filesystem::perms perms,
90 std::filesystem::perm_options options = std::filesystem::perm_options::replace
91);
92
98
99} // namespace fs::blocking
100
101USERVER_NAMESPACE_END