Trim include dependency tree (particularly on evoral/Sequence.hpp).
[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 PBD;
11
12 bool
13 create_session_directory (const string& session_directory_path)
14 {
15         SessionDirectory sdir(session_directory_path);
16
17         try
18         {
19                 // create all the required session directories
20                 sdir.create();
21         }
22         catch(sys::filesystem_error& ex)
23         {
24                 // log the exception
25                 warning << string_compose
26                         (
27                          _("Unable to create session directory at path %1 : %2"),
28                          session_directory_path,
29                          ex.what()
30                         );
31
32                 return false;
33         }
34
35         // successfully created the session directory
36         return true;
37 }
38
39 } // namespace ARDOUR