second (and hopefully) final part of changes to respond to header format changes...
[ArdourMidi.git] / libs / ardour / session_utils.cc
blob9c367a702fcaa2fb77c75d2a90c9ece524dba5d2
2 #include "pbd/error.h"
4 #include <stdint.h>
5 #include "ardour/session_directory.h"
7 #include "i18n.h"
9 namespace ARDOUR {
11 using namespace std;
12 using namespace PBD;
14 bool
15 create_session_directory (const string& session_directory_path)
17 SessionDirectory sdir(session_directory_path);
19 try
21 // create all the required session directories
22 sdir.create();
24 catch(sys::filesystem_error& ex)
26 // log the exception
27 warning << string_compose
29 _("Unable to create session directory at path %1 : %2"),
30 session_directory_path,
31 ex.what()
34 return false;
37 // successfully created the session directory
38 return true;
41 } // namespace ARDOUR