some LV2 debug tracing
[ardour.git] / libs / ardour / session_utils.cc
1
2 #include "pbd/error.h"
3
4 #include <stdint.h>
5 #include "ardour/session_directory.h"
6
7 #include "i18n.h"
8
9 namespace ARDOUR {
10
11 using namespace std;
12 using namespace PBD;
13
14 bool
15 create_session_directory (const string& session_directory_path)
16 {
17         SessionDirectory sdir(session_directory_path);
18
19         try
20         {
21                 // create all the required session directories
22                 sdir.create();
23         }
24         catch(sys::filesystem_error& ex)
25         {
26                 // log the exception
27                 warning << string_compose
28                         (
29                          _("Unable to create session directory at path %1 : %2"),
30                          session_directory_path,
31                          ex.what()
32                         );
33
34                 return false;
35         }
36
37         // successfully created the session directory
38         return true;
39 }
40
41 } // namespace ARDOUR