#include <userver/dump/operations_file.hpp>
A handle to a dump file. File operations block the thread.
Definition at line 22 of file operations_file.hpp.
|
| | FileWriter (std::string path, std::filesystem::perms perms, tracing::ScopeTime &scope) |
| | Creates a new dump file and opens it.
|
| template<fs::blocking::impl::LegacyPermissions Permissions> |
| | FileWriter (std::string path, Permissions perms, tracing::ScopeTime &scope) |
| void | Finish () override |
| | Must be called once all data has been written.
|
| template<typename T> |
| void | Write (const T &data) |
| | Writes binary data.
|
◆ FileWriter() [1/2]
| dump::FileWriter::FileWriter |
( |
std::string | path, |
|
|
std::filesystem::perms | perms, |
|
|
tracing::ScopeTime & | scope ) |
|
explicit |
Creates a new dump file and opens it.
- Parameters
-
| perms | final permissions to set when finalizing the dump |
- Exceptions
-
| `Error` | on a filesystem error |
◆ FileWriter() [2/2]
template<fs::blocking::impl::LegacyPermissions Permissions>
| dump::FileWriter::FileWriter |
( |
std::string | path, |
|
|
Permissions | perms, |
|
|
tracing::ScopeTime & | scope ) |
|
inlineexplicit |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Accepts boost::filesystem::perms; permission option flags are ignored.
- Deprecated
- use the std::filesystem overload
Definition at line 33 of file operations_file.hpp.
◆ Finish()
| void dump::FileWriter::Finish |
( |
| ) |
|
|
overridevirtual |
Must be called once all data has been written.
- Warning
- This method must not be called from within Write/Read
- Exceptions
-
| `Error` | on write operation failure |
Implements dump::Writer.
◆ Write()
template<typename T>
| void dump::Writer::Write |
( |
const T & | data | ) |
|
|
inherited |
Writes binary data.
Calls ADL-found Write(writer, data)
- Exceptions
-
| `Error` | and any user-thrown std::exception |
Definition at line 101 of file operations.hpp.
The documentation for this class was generated from the following file: