diff --git a/src/libaevol/io/UserInterfaceOutput.cpp b/src/libaevol/io/UserInterfaceOutput.cpp index 8fd96d4683de1a1ff421c6a977c8654237d330a5..7eee365dafc7854c895a4c879e650a0cddaeed87 100644 --- a/src/libaevol/io/UserInterfaceOutput.cpp +++ b/src/libaevol/io/UserInterfaceOutput.cpp @@ -28,4 +28,8 @@ namespace aevol { +UserInterfaceOutput::UserInterfaceOutput(const std::filesystem::path& outdir): outdir_(outdir) { + std::filesystem::create_directories(outdir_); +} + } diff --git a/src/libaevol/io/UserInterfaceOutput.h b/src/libaevol/io/UserInterfaceOutput.h index f2079d7d5161baa472cbcccda4ea0b18b8f13de6..a0620a6c480b4b4448e3117f5b3086a326cf2ee6 100644 --- a/src/libaevol/io/UserInterfaceOutput.h +++ b/src/libaevol/io/UserInterfaceOutput.h @@ -27,6 +27,8 @@ #ifndef AEVOL_USERINTERFACEOUTPUT_H_ #define AEVOL_USERINTERFACEOUTPUT_H_ +#include <filesystem> + namespace aevol { class UserInterfaceOutput { @@ -36,9 +38,11 @@ class UserInterfaceOutput { UserInterfaceOutput(UserInterfaceOutput&&) = delete; UserInterfaceOutput& operator=(const UserInterfaceOutput&) = delete; UserInterfaceOutput& operator=(UserInterfaceOutput&&) = delete; + UserInterfaceOutput(const std::filesystem::path& outdir); virtual ~UserInterfaceOutput() = default; protected: + std::filesystem::path outdir_; }; }