MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / CsvWriter

Method CsvWriter

lib/mdflib/mdf2csv/src/csvwriter.cpp:15–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace mdf {
14
15CsvWriter::CsvWriter(const std::string& filename)
16: dest_filename_(filename) {
17 try {
18 path fullname(filename);
19 path parent_path = fullname.parent_path();
20 parent_path_ = parent_path.string();
21 name_ = fullname.filename().string();
22
23 path temp_path = temp_directory_path();
24 temp_path.append(name_);
25 temp_filename_ = temp_path.string();
26
27 if (!exists(parent_path_)) {
28 create_directories(parent_path_);
29 }
30
31 is_ok_ = true;
32 } catch (const std::exception& err) {
33 MDF_ERROR() << "CSV file path error. Error: " << err.what();
34 }
35}
36
37CsvWriter::~CsvWriter() {
38 try {

Callers

nothing calls this directly

Calls 2

filenameMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected