userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
temp_file.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <string>
7
#include <string_view>
8
9
USERVER_NAMESPACE_BEGIN
10
11
namespace
fs::blocking
{
12
21
class
TempFile final {
22
public
:
25
static
TempFile
Create
();
26
32
static
TempFile
Create
(std::string_view parent_path, std::string_view name_prefix);
33
34
TempFile() =
delete
;
35
TempFile(TempFile&& other)
noexcept
;
36
TempFile& operator=(TempFile&& other)
noexcept
;
37
~TempFile();
38
40
static
TempFile
Adopt
(std::string path);
41
43
const
std::string&
GetPath
()
const
;
44
47
void
Remove
() &&;
48
49
private
:
50
explicit
TempFile(std::string&& path);
51
52
std::string path_;
53
};
54
55
}
// namespace fs::blocking
56
57
USERVER_NAMESPACE_END
userver
fs
blocking
temp_file.hpp
Generated on
for userver by
Doxygen
1.17.0