21 #include <glibmm/fileutils.h>
22 #include <glibmm/miscutils.h>
30 #include "ardour/utils.h"
40 : m_root_path(session_path)
56 for (vector<std::string>::const_iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i)
58 if (g_mkdir_with_parents (i->c_str(), 0755) != 0) {
70 if (!Glib::file_test (
m_root_path, Glib::FILE_TEST_IS_DIR))
return false;
74 for (vector<std::string>::iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i) {
75 if (!Glib::file_test (*i, Glib::FILE_TEST_IS_DIR)) {
93 std::string filename = Glib::path_get_basename(p);
95 if (filename ==
".") {
102 return Glib::build_filename (sources_root_path, legalized_root);
109 std::string filename = Glib::path_get_basename(p);
111 if (filename ==
".") {
118 return Glib::build_filename (sources_root_path, legalized_root);
172 const vector<std::string>
175 vector<std::string> tmp_paths;
LIBARDOUR_API const char *const midi_dir_name
const std::string sound_path_2X() const
const std::string sources_root_2X() const
SessionDirectory & operator=(const std::string &path)
LIBARDOUR_API const char *const old_sound_dir_name
LIBARDOUR_API const char *const midi_patch_dir_name
LIBARDOUR_API std::string legalize_for_path(const std::string &str)
const std::string video_path() const
LIBARDOUR_API const char *const export_dir_name
LIBARDOUR_API const char *const video_dir_name
LIBPBD_API Transmitter error
LIBPBD_API Transmitter warning
std::string m_root_path
The path to the root of the session directory.
std::ostream & endmsg(std::ostream &ostr)
const std::string dead_path() const
LIBARDOUR_API std::string legalize_for_path_2X(const std::string &str)
SessionDirectory(const std::string &session_path)
const std::string old_sound_path() const
const std::vector< std::string > sub_directories() const
std::string get_absolute_path(const std::string &p)
const std::string sound_path() const
const std::string midi_patch_path() const
const std::string peak_path() const
const std::string export_path() const
LIBARDOUR_API const char *const sound_dir_name
LIBARDOUR_API const char *const interchange_dir_name
const std::string midi_path() const
const std::string sources_root() const
std::string string_compose(const std::string &fmt, const T1 &o1)
LIBARDOUR_API const char *const peak_dir_name
LIBARDOUR_API const char *const dead_dir_name