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