mirror of
https://github.com/paulscherrerinstitute/sf_daq_buffer.git
synced 2026-04-23 08:02:43 +02:00
Add folder creation to the writer
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <cstring>
|
||||
#include <BufferUtils.hpp>
|
||||
#include <fcntl.h>
|
||||
#include <WriterUtils.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -86,6 +87,8 @@ void BinaryWriter::open_file(const std::string& filename)
|
||||
{
|
||||
close_current_file();
|
||||
|
||||
WriterUtils::create_destination_folder(filename);
|
||||
|
||||
output_file_fd_ = ::open(filename.c_str(), O_WRONLY | O_CREAT | O_DSYNC);
|
||||
if (output_file_fd_ < 0) {
|
||||
stringstream err_msg;
|
||||
|
||||
Reference in New Issue
Block a user