{
// set_type_hint(Gdk::WINDOW_TYPE_HINT_SPLASHSCREEN);
- string path;
string t;
- sys::path splash_file;
+ std::string splash_file;
SearchPath spath(ardour_data_search_path());
if (find_file_in_search_path (spath, "splash.png", splash_file)) {
- set_logo (Gdk::Pixbuf::create_from_file (splash_file.to_string()));
+ set_logo (Gdk::Pixbuf::create_from_file (splash_file));
} else {
error << "Could not find splash file" << endmsg;
}
void
ActionManager::init ()
{
- sys::path ui_file;
+ std::string ui_file;
ui_manager = UIManager::create ();
bool loaded = false;
try {
- ui_manager->add_ui_from_file (ui_file.to_string());
- info << string_compose (_("Loading menus from %1"), ui_file.to_string()) << endmsg;
+ ui_manager->add_ui_from_file (ui_file);
+ info << string_compose (_("Loading menus from %1"), ui_file) << endmsg;
loaded = true;
} catch (Glib::MarkupError& err) {
error << string_compose (_("badly formatted UI definition file: %1"), err.what()) << endmsg;
for (vector<sys::path>::const_iterator i = session_directories.begin();
i != session_directories.end(); ++i)
{
- std::vector<sys::path> state_file_paths;
+ std::vector<std::string> state_file_paths;
// now get available states for this session
- get_state_files_in_directory (*i, state_file_paths);
+ get_state_files_in_directory (i->to_string(), state_file_paths);
vector<string*>* states;
vector<const gchar*> item;
}
}
- vector<sys::path> p;
+ vector<std::string> p;
get_state_files_in_directory (_session->session_directory().root_path(), p);
vector<string> n = get_file_names_no_extension (p);
if (find (n.begin(), n.end(), snapname) != n.end()) {
dimage->set_alignment(ALIGN_LEFT, ALIGN_TOP);
- const string dead_directory = _session->session_directory().dead_path().to_string();
+ const string dead_directory = _session->session_directory().dead_path();
/* subst:
%1 - number of files removed
key_bindings.set_action_map (editor_action_map);
- sys::path binding_file;
+ std::string binding_file;
if (find_file_in_search_path (ardour_config_search_path(), "editor.bindings", binding_file)) {
- key_bindings.load (binding_file.to_string());
- info << string_compose (_("Loaded editor bindings from %1"), binding_file.to_string()) << endmsg;
+ key_bindings.load (binding_file);
+ info << string_compose (_("Loaded editor bindings from %1"), binding_file) << endmsg;
} else {
error << string_compose (_("Could not find editor.bindings in search path %1"), ardour_config_search_path().to_string()) << endmsg;
}
vector<boost::shared_ptr<AudioFileSource> > sources;
uint32_t nchans;
- const string sound_directory = _session->session_directory().sound_path().to_string();
+ const string sound_directory = _session->session_directory().sound_path();
nchans = region->n_channels();
string path;
vector<boost::shared_ptr<AudioFileSource> > sources;
- const string sound_directory = _session->session_directory().sound_path().to_string();
+ const string sound_directory = _session->session_directory().sound_path();
uint32_t channels = count.n_audio();
return;
}
- vector<sys::path> state_file_paths;
+ vector<std::string> state_file_paths;
get_state_files_in_directory (_session->session_directory().root_path(),
state_file_paths);
#include "pbd/error.h"
#include "pbd/file_utils.h"
+#include "pbd/filesystem.h"
#include "ardour/filesystem_paths.h"
if (!Glib::path_is_absolute (keybindings_path)) {
/* not absolute - look in the usual places */
- sys::path keybindings_file;
+ std::string keybindings_file;
if ( ! find_file_in_search_path (ardour_config_search_path(), keybindings_path, keybindings_file)) {
/* use it */
- keybindings_path = keybindings_file.to_string();
+ keybindings_path = keybindings_file;
break;
}
std::string path;
std::string dir_path = Glib::path_get_dirname (Glib::path_get_dirname (argv[0]));
- std::string userconfigdir = user_config_directory().to_string();
+ std::string userconfigdir = user_config_directory();
/* note that this function is POSIX/Linux specific, so using / as
a dir separator in this context is just fine.
bindings.set_action_map (myactions);
- sys::path binding_file;
+ std::string binding_file;
if (find_file_in_search_path (ardour_config_search_path(), "mixer.bindings", binding_file)) {
- bindings.load (binding_file.to_string());
- info << string_compose (_("Loaded mixer bindings from %1"), binding_file.to_string()) << endmsg;
+ bindings.load (binding_file);
+ info << string_compose (_("Loaded mixer bindings from %1"), binding_file) << endmsg;
} else {
error << string_compose (_("Could not find mixer.bindings in search path %1"), ardour_config_search_path().to_string()) << endmsg;
}
bool really_subscribed;
bool maybe_subscribed;
- path = Glib::build_filename (user_config_directory().to_string(), ".nevernag");
+ path = Glib::build_filename (user_config_directory(), ".nevernag");
if (Glib::file_test (path, Glib::FILE_TEST_EXISTS)) {
return 0;
{
std::string path;
- path = Glib::build_filename (user_config_directory().to_string(), ".nevernag");
+ path = Glib::build_filename (user_config_directory(), ".nevernag");
ofstream nagfile (path.c_str());
}
{
std::string path;
- path = Glib::build_filename (user_config_directory().to_string(), ".askedaboutsub");
+ path = Glib::build_filename (user_config_directory(), ".askedaboutsub");
ofstream subsfile (path.c_str());
}
{
std::string path;
- path = Glib::build_filename (user_config_directory().to_string(), ".isubscribe");
+ path = Glib::build_filename (user_config_directory(), ".isubscribe");
ofstream subsfile (path.c_str());
}
subscribed. we try to trust our users :)
*/
- path = Glib::build_filename (user_config_directory().to_string(), ".isubscribe");
+ path = Glib::build_filename (user_config_directory(), ".isubscribe");
if (file_test (path, FILE_TEST_EXISTS)) {
really = true;
return true;
}
- path = Glib::build_filename (user_config_directory().to_string(), ".askedaboutsub");
+ path = Glib::build_filename (user_config_directory(), ".askedaboutsub");
if (file_test (path, FILE_TEST_EXISTS)) {
/* they never said they were subscribed but they
did once express an interest in it.
bool
SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths)
{
- sys::path path = s->session_directory().sound_path() / "linktest";
- string tmpdir = path.to_string();
+ std::string tmpdir(Glib::build_filename (s->session_directory().sound_path(), "linktest"));
bool ret = false;
if (mkdir (tmpdir.c_str(), 0744)) {
{
assert (the_splash == 0);
- sys::path splash_file;
+ std::string splash_file;
if (!find_file_in_search_path (ardour_data_search_path(), "splash.png", splash_file)) {
throw failed_constructor();
}
try {
- pixbuf = Gdk::Pixbuf::create_from_file (splash_file.to_string());
+ pixbuf = Gdk::Pixbuf::create_from_file (splash_file);
}
catch (...) {
for (vector<sys::path>::const_iterator i = session_directories.begin(); i != session_directories.end(); ++i)
{
- std::vector<sys::path> state_file_paths;
+ std::vector<std::string> state_file_paths;
// now get available states for this session
- get_state_files_in_directory (*i, state_file_paths);
+ get_state_files_in_directory ((*i).to_string (), state_file_paths);
vector<string*>* states;
vector<const gchar*> item;
bindings.set_action_map (myactions);
- sys::path binding_file;
+ std::string binding_file;
if (find_file_in_search_path (ardour_config_search_path(), "step_editing.bindings", binding_file)) {
- bindings.load (binding_file.to_string());
+ bindings.load (binding_file);
}
}
void
load_rc_file (const string& filename, bool themechange)
{
- sys::path rc_file_path;
+ std::string rc_file_path;
if (!find_file_in_search_path (ardour_config_search_path(), filename, rc_file_path)) {
warning << string_compose (_("Unable to find UI style file %1 in search path %2. %3 will look strange"),
return;
}
- info << "Loading ui configuration file " << rc_file_path.to_string() << endmsg;
+ info << "Loading ui configuration file " << rc_file_path << endmsg;
- Gtkmm2ext::UI::instance()->load_rcfile (rc_file_path.to_string(), themechange);
+ Gtkmm2ext::UI::instance()->load_rcfile (rc_file_path, themechange);
}
/* hmm, this is a problem. the profile doesn't
{
int found = 0;
- sys::path default_ui_rc_file;
+ std::string default_ui_rc_file;
std::string rcfile;
if (getenv ("ARDOUR_SAE")) {
XMLTree tree;
found = 1;
- string rcfile = default_ui_rc_file.to_string();
+ string rcfile = default_ui_rc_file;
info << string_compose (_("Loading default ui configuration file %1"), rcfile) << endl;
{
bool found = false;
- sys::path default_ui_rc_file;
+ std::string default_ui_rc_file;
if ( find_file_in_search_path (ardour_config_search_path(), "ardour3_ui_default.conf", default_ui_rc_file)) {
XMLTree tree;
found = true;
- string rcfile = default_ui_rc_file.to_string();
+ string rcfile = default_ui_rc_file;
info << string_compose (_("Loading default ui configuration file %1"), rcfile) << endl;
}
}
- sys::path user_ui_rc_file;
+ std::string user_ui_rc_file;
if (find_file_in_search_path (ardour_config_search_path(), "ardour3_ui.conf", user_ui_rc_file)) {
XMLTree tree;
found = true;
- string rcfile = user_ui_rc_file.to_string();
+ string rcfile = user_ui_rc_file;
info << string_compose (_("Loading user ui configuration file %1"), rcfile) << endmsg;
spath.add_subdirectory_to_paths("pixmaps");
- sys::path data_file_path;
+ std::string data_file_path;
if(!find_file_in_search_path (spath, name, data_file_path)) {
fatal << string_compose (_("cannot find XPM file for %1"), name) << endmsg;
}
try {
- xpm_map[name] = Gdk::Pixbuf::create_from_file (data_file_path.to_string());
+ xpm_map[name] = Gdk::Pixbuf::create_from_file (data_file_path);
} catch(const Glib::Error& e) {
warning << "Caught Glib::Error: " << e.what() << endmsg;
}
spath.add_subdirectory_to_paths("icons");
- sys::path data_file_path;
+ std::string data_file_path;
if (!find_file_in_search_path (spath, name, data_file_path)) {
fatal << string_compose (_("cannot find icon image for %1 using %2"), name, spath.to_string()) << endmsg;
}
- return data_file_path.to_string();
+ return data_file_path;
}
Glib::RefPtr<Gdk::Pixbuf>
#include "pbd/uuid.h"
#include "pbd/file_utils.h"
#include "pbd/xml++.h"
+#include "pbd/filesystem.h"
#include "ardour/filesystem_paths.h"
#include "ardour/location.h"
ExportPresetPtr current_preset;
FileMap preset_file_map;
- std::vector<PBD::sys::path> find_file (std::string const & pattern);
+ std::vector<std::string> find_file (std::string const & pattern);
PBD::sys::path export_config_dir;
PBD::SearchPath search_path;
#ifndef ARDOUR_FILESYSTEM_PATHS_INCLUDED
#define ARDOUR_FILESYSTEM_PATHS_INCLUDED
-#include "pbd/filesystem.h"
#include "pbd/search_path.h"
namespace ARDOUR {
* @return the path to the directory used to store user specific ardour
* configuration files.
*/
- PBD::sys::path user_config_directory ();
+ std::string user_config_directory ();
/**
* @return the path to the directory that contains the system wide ardour
* modules.
*/
- PBD::sys::path ardour_dll_directory ();
+ std::string ardour_dll_directory ();
/**
* @return the search path to be used when looking for per-system
#include <string>
#include <vector>
-#include "pbd/filesystem.h"
-
namespace ARDOUR {
class SessionDirectory
/**
* @param session_path An absolute path to a session directory.
*/
- SessionDirectory (const PBD::sys::path& session_path);
+ SessionDirectory (const std::string& session_path);
/**
* Change the root path of this SessionDirectory object
/**
* @return the absolute path to the root directory of the session
*/
- const PBD::sys::path root_path() const { return m_root_path; }
+ const std::string root_path() const { return m_root_path; }
/**
* @return the absolute path to the directory in which
* directory otherwise it will return the new location
* of root_path()/interchange/session_name/audiofiles
*/
- const PBD::sys::path sound_path () const;
+ const std::string sound_path () const;
/**
* @return the absolute path to the directory in which
* the session stores MIDI files, ie
* root_path()/interchange/session_name/midifiles
*/
- const PBD::sys::path midi_path () const;
+ const std::string midi_path () const;
/**
* @return the absolute path to the directory in which
* the session stores MIDNAM patch files, ie
* root_path()/interchange/session_name/patchfiles
*/
- const PBD::sys::path midi_patch_path () const;
+ const std::string midi_patch_path () const;
/**
* @return The absolute path to the directory in which all
* peak files are stored for a session.
*/
- const PBD::sys::path peak_path () const;
+ const std::string peak_path () const;
/**
* @return The absolute path to the directory that source
* files are moved to when they are no longer part of the
* session.
*/
- const PBD::sys::path dead_path () const;
+ const std::string dead_path () const;
/**
* @return The absolute path to the directory that audio
* files are created in by default when exporting.
*/
- const PBD::sys::path export_path () const;
+ const std::string export_path () const;
/**
* @return true if session directory and all the required
/**
* Create the session directory and all the subdirectories.
*
- * @throw PBD::sys::filesystem_error if the directories were
- * not able to be created.
- *
* @return true If a new session directory was created, otherwise
* (if it already existed) false.
*
* are created for different source types.
* i.e root_path()/interchange/session_name
*/
- const PBD::sys::path sources_root() const;
+ const std::string sources_root() const;
private:
* @return The path to the old style sound directory.
* It isn't created by create().
*/
- const PBD::sys::path old_sound_path () const;
+ const std::string old_sound_path () const;
/**
* @return a vector containing the fullpath of all subdirectories.
*/
- const std::vector<PBD::sys::path> sub_directories () const;
+ const std::vector<std::string> sub_directories () const;
/// The path to the root of the session directory.
- PBD::sys::path m_root_path;
+ std::string m_root_path;
};
} // namespace ARDOUR
* @param directory_path The absolute path to a directory.
* @param result vector to contain resulting state files.
*/
-void get_state_files_in_directory (const PBD::sys::path & directory_path,
- std::vector<PBD::sys::path>& result);
+void get_state_files_in_directory (const std::string& directory_path,
+ std::vector<std::string>& result);
/**
* Given a vector of paths to files, return a vector containing
* @return a vector containing a list of file names without any
* filename extension.
*/
-std::vector<std::string> get_file_names_no_extension (const std::vector<PBD::sys::path> & file_paths);
+std::vector<std::string> get_file_names_no_extension (const std::vector<std::string> & file_paths);
} // namespace ARDOUR
#include <glibmm/convert.h>
#include "pbd/compose.h"
+#include "pbd/filesystem.h"
#include "ardour/audio_library.h"
#include "ardour/utils.h"
int
AudioPlaylistSource::setup_peakfile ()
{
- _peak_path = Glib::build_filename (_session.session_directory().peak_path().to_string(), name() + ARDOUR::peakfile_suffix);
+ _peak_path = Glib::build_filename (_session.session_directory().peak_path(), name() + ARDOUR::peakfile_suffix);
return initialize_peakfile (false, string());
}
#include <sstream>
+#include <glibmm/miscutils.h>
+
#include "pbd/failed_constructor.h"
#include "pbd/compose.h"
#include "pbd/error.h"
PBD::sys::path
AudioRegionImporter::get_sound_dir (XMLTree const & tree)
{
- PBD::sys::path source_dir = tree.filename();
- source_dir = source_dir.branch_path();
- SessionDirectory session_dir(source_dir);
- source_dir = session_dir.sound_path();
-
- return source_dir;
+ SessionDirectory session_dir(Glib::path_get_dirname (tree.filename()));
+ return session_dir.sound_path();
}
void
void
block_mothership ()
{
- string hangup = Glib::build_filename (ARDOUR::user_config_directory().to_string(), OFF_THE_HOOK);
+ string hangup = Glib::build_filename (ARDOUR::user_config_directory(), OFF_THE_HOOK);
int fd;
if ((fd = ::open (hangup.c_str(), O_RDWR|O_CREAT, 0600)) >= 0) {
close (fd);
void
unblock_mothership ()
{
- string hangup = Glib::build_filename (ARDOUR::user_config_directory().to_string(), OFF_THE_HOOK);
+ string hangup = Glib::build_filename (ARDOUR::user_config_directory(), OFF_THE_HOOK);
::unlink (hangup.c_str());
}
bool
mothership_blocked ()
{
- string hangup = Glib::build_filename (ARDOUR::user_config_directory().to_string(), OFF_THE_HOOK);
+ string hangup = Glib::build_filename (ARDOUR::user_config_directory(), OFF_THE_HOOK);
return Glib::file_test (hangup, Glib::FILE_TEST_EXISTS);
}
void
ControlProtocolManager::discover_control_protocols ()
{
- vector<sys::path> cp_modules;
+ vector<std::string> cp_modules;
Glib::PatternSpec so_extension_pattern("*.so");
Glib::PatternSpec dylib_extension_pattern("*.dylib");
DEBUG_TRACE (DEBUG::ControlProtocols,
string_compose (_("looking for control protocols in %1\n"), control_protocol_search_path().to_string()));
- for (vector<sys::path>::iterator i = cp_modules.begin(); i != cp_modules.end(); ++i) {
- control_protocol_discover ((*i).to_string());
+ for (vector<std::string>::iterator i = cp_modules.begin(); i != cp_modules.end(); ++i) {
+ control_protocol_discover (*i);
}
}
SearchPath
control_protocol_search_path ()
{
- SearchPath spath (user_config_directory ());
-
+ SearchPath spath(user_config_directory ());
spath += ardour_dll_directory ();
spath.add_subdirectory_to_paths (surfaces_dir_name);
-
- bool surfaces_path_defined = false;
- SearchPath spath_env (Glib::getenv(surfaces_env_variable_name, surfaces_path_defined));
- if (surfaces_path_defined) {
- spath += spath_env;
- }
-
+ spath += SearchPath(Glib::getenv(surfaces_env_variable_name));
return spath;
}
std::time (&rawtime);
time_struct = localtime (&rawtime);
- folder = session.session_directory().export_path().to_string();
+ folder = session.session_directory().export_path();
XMLNode * instant_node = session.instant_xml ("ExportFilename");
if (instant_node) {
if ((prop = child->property ("relative"))) {
if (!prop->value().compare ("true")) {
- folder = session.session_directory().root_path().to_string();
+ folder = session.session_directory().root_path();
}
}
{
FieldPair pair;
- string session_dir = session.session_directory().root_path().to_string();
+ string session_dir = session.session_directory().root_path();
string::size_type session_dir_len = session_dir.length();
string folder_beginning = folder.substr (0, session_dir_len);
export_formats_search_path ()
{
SearchPath spath;
-
- spath = user_config_directory ();
- spath.add_subdirectory_to_paths (export_formats_dir_name);
-
- bool export_path_defined = false;
- SearchPath spath_env = Glib::getenv (export_env_variable_name, export_path_defined);
-
- if (export_path_defined) {
- spath += spath_env;
- }
-
+ spath += Glib::build_filename (user_config_directory (), export_formats_dir_name);
+ spath += SearchPath(Glib::getenv (export_env_variable_name));
return spath;
}
#include "pbd/enumwriter.h"
#include "pbd/xml++.h"
#include "pbd/convert.h"
+#include "pbd/filesystem.h"
#include "ardour/export_profile_manager.h"
#include "ardour/export_format_specification.h"
void
ExportProfileManager::load_presets ()
{
- vector<sys::path> found = find_file (string_compose (X_("*%1"),export_preset_suffix));
+ vector<std::string> found = find_file (string_compose (X_("*%1"),export_preset_suffix));
- for (vector<sys::path>::iterator it = found.begin(); it != found.end(); ++it) {
+ for (vector<std::string>::iterator it = found.begin(); it != found.end(); ++it) {
load_preset_from_disk (*it);
}
}
}
}
-std::vector<sys::path>
+std::vector<std::string>
ExportProfileManager::find_file (std::string const & pattern)
{
- vector<sys::path> found;
+ vector<std::string> found;
Glib::PatternSpec pattern_spec (pattern);
find_matching_files_in_search_path (search_path, pattern_spec, found);
void
ExportProfileManager::load_formats ()
{
- vector<sys::path> found = find_file (string_compose ("*%1", export_format_suffix));
+ vector<std::string> found = find_file (string_compose ("*%1", export_format_suffix));
- for (vector<sys::path>::iterator it = found.begin(); it != found.end(); ++it) {
+ for (vector<std::string>::iterator it = found.begin(); it != found.end(); ++it) {
load_format_from_disk (*it);
}
}
#include "pbd/error.h"
#include "pbd/compose.h"
#include "pbd/strsplit.h"
+#include "pbd/filesystem.h"
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
using std::string;
-sys::path
+std::string
user_config_directory ()
{
sys::path p;
exit (1);
}
- return p;
+ return p.to_string();
}
-sys::path
+std::string
ardour_dll_directory ()
{
std::string s = Glib::getenv("ARDOUR_DLL_PATH");
std::cerr << _("ARDOUR_DLL_PATH not set in environment - exiting\n");
::exit (1);
}
- return sys::path (s);
+ return s;
}
SearchPath
std::vector<string> ss;
split (s, ss, ':');
for (std::vector<string>::iterator i = ss.begin(); i != ss.end(); ++i) {
- sp += sys::path (*i);
+ sp += *i;
}
search_path = sp;
std::vector<string> ss;
split (s, ss, ':');
for (std::vector<string>::iterator i = ss.begin(); i != ss.end(); ++i) {
- sp += sys::path (*i);
+ sp += *i;
}
search_path = sp;
#include "pbd/fpu.h"
#include "pbd/file_utils.h"
#include "pbd/enumwriter.h"
+#include "pbd/filesystem.h"
#include "midi++/port.h"
#include "midi++/manager.h"
void
ARDOUR::find_bindings_files (map<string,string>& files)
{
- vector<sys::path> found;
+ vector<std::string> found;
SearchPath spath = ardour_config_search_path();
if (getenv ("ARDOUR_SAE")) {
return;
}
- for (vector<sys::path>::iterator x = found.begin(); x != found.end(); ++x) {
- sys::path path = *x;
+ for (vector<std::string>::iterator x = found.begin(); x != found.end(); ++x) {
+ sys::path path(*x);
pair<string,string> namepath;
namepath.second = path.to_string();
namepath.first = path.leaf().substr (0, path.leaf().find_first_of ('.'));
string
ARDOUR::translation_kill_path ()
{
- return Glib::build_filename (user_config_directory().to_string(), ".love_is_the_language_of_audio");
+ return Glib::build_filename (user_config_directory(), ".love_is_the_language_of_audio");
}
bool
const DataType type = SMFSource::safe_midi_file_extension (import_file_path) ? DataType::MIDI : DataType::AUDIO;
std::string filepath = (type == DataType::MIDI)
- ? sdir.midi_path().to_string() : sdir.sound_path().to_string();
+ ? sdir.midi_path() : sdir.sound_path();
filepath = Glib::build_filename (filepath,
get_non_existent_filename (hf, type, allow_replacing, filepath, basename, n, channels));
#include <boost/shared_ptr.hpp>
+#include <glibmm/fileutils.h>
+
#include "pbd/file_utils.h"
#include "pbd/error.h"
using namespace MIDI;
using namespace MIDI::Name;
using namespace PBD;
-using namespace PBD::sys;
MidiPatchManager* MidiPatchManager::_manager = 0;
return;
}
- path path_to_patches = _session->session_directory().midi_patch_path();
+ std::string path_to_patches = _session->session_directory().midi_patch_path();
- if (!exists (path_to_patches)) {
+ if (!Glib::file_test (path_to_patches, Glib::FILE_TEST_EXISTS)) {
return;
}
- assert(is_directory(path_to_patches));
+ assert (Glib::file_test (path_to_patches, Glib::FILE_TEST_IS_DIR));
Glib::PatternSpec pattern(string("*.midnam"));
- vector<path> result;
+ vector<std::string> result;
find_matching_files_in_directory (path_to_patches, pattern, result);
- info << "Loading " << result.size() << " MIDI patches from " << path_to_patches.to_string() << endmsg;
+ info << "Loading " << result.size() << " MIDI patches from " << path_to_patches << endmsg;
- for (vector<path>::iterator i = result.begin(); i != result.end(); ++i) {
- boost::shared_ptr<MIDINameDocument> document(new MIDINameDocument(i->to_string()));
+ for (vector<std::string>::iterator i = result.begin(); i != result.end(); ++i) {
+ boost::shared_ptr<MIDINameDocument> document(new MIDINameDocument(*i));
for (MIDINameDocument::MasterDeviceNamesList::const_iterator device =
document->master_device_names_by_model().begin();
device != document->master_device_names_by_model().end();
SearchPath search_path = midi_patch_search_path ();
Glib::PatternSpec pattern (string("*.midnam"));
- vector<path> result;
+ vector<std::string> result;
find_matching_files_in_search_path (search_path, pattern, result);
info << "Loading " << result.size() << " MIDI patches from " << search_path.to_string() << endmsg;
- for (vector<path>::iterator i = result.begin(); i != result.end(); ++i) {
- boost::shared_ptr<MIDINameDocument> document(new MIDINameDocument(i->to_string()));
+ for (vector<std::string>::iterator i = result.begin(); i != result.end(); ++i) {
+ boost::shared_ptr<MIDINameDocument> document(new MIDINameDocument(*i));
for (MIDINameDocument::MasterDeviceNamesList::const_iterator device =
document->master_device_names_by_model().begin();
device != document->master_device_names_by_model().end();
#include <algorithm>
#include <glibmm/fileutils.h>
+#include <glibmm/miscutils.h>
#include "pbd/xml++.h"
#include "pbd/pthread_utils.h"
do {
newname = bump_name_once (newname, '-');
- /* XXX build path safely */
- newpath = _session.session_directory().midi_path().to_string() +"/"+ newname + ".mid";
+ newpath = Glib::build_filename (_session.session_directory().midi_path(), newname + ".mid");
} while (Glib::file_test (newpath, Glib::FILE_TEST_EXISTS));
} else {
void
PannerManager::discover_panners ()
{
- vector<sys::path> panner_modules;
+ vector<std::string> panner_modules;
Glib::PatternSpec so_extension_pattern("*.so");
Glib::PatternSpec dylib_extension_pattern("*.dylib");
DEBUG_TRACE (DEBUG::Panning, string_compose (_("looking for panners in %1"), panner_search_path().to_string()));
- for (vector<sys::path>::iterator i = panner_modules.begin(); i != panner_modules.end(); ++i) {
- panner_discover ((*i).to_string());
+ for (vector<std::string>::iterator i = panner_modules.begin(); i != panner_modules.end(); ++i) {
+ panner_discover (*i);
}
}
int
SearchPath
panner_search_path ()
{
- SearchPath spath (user_config_directory ());
-
+ SearchPath spath(user_config_directory ());
spath += ardour_dll_directory ();
spath.add_subdirectory_to_paths(panner_dir_name);
- bool panner_path_defined = false;
- SearchPath spath_env (Glib::getenv(panner_env_variable_name, panner_path_defined));
-
- if (panner_path_defined) {
- spath += spath_env;
- }
-
+ spath += SearchPath(Glib::getenv(panner_env_variable_name));
return spath;
}
#include "pbd/pathscanner.h"
#include "pbd/whitespace.h"
+#include "pbd/filesystem.h"
#include "ardour/debug.h"
#include "ardour/filesystem_paths.h"
int
RCConfiguration::load_state ()
{
- sys::path system_rc_file;
+ std::string rcfile;
struct stat statbuf;
/* load system configuration first */
- if (find_file_in_search_path (ardour_config_search_path(), "ardour_system.rc", system_rc_file)) {
- string rcfile = system_rc_file.to_string();
+ if (find_file_in_search_path (ardour_config_search_path(), "ardour_system.rc", rcfile)) {
/* stupid XML Parser hates empty files */
/* now load configuration file for user */
- sys::path user_rc_file;
-
- if (find_file_in_search_path (ardour_config_search_path(), "ardour.rc", user_rc_file)) {
- string rcfile = user_rc_file.to_string();
+ if (find_file_in_search_path (ardour_config_search_path(), "ardour.rc", rcfile)) {
/* stupid XML parser hates empty files */
#include <algorithm>
#include "pbd/error.h"
+#include "pbd/filesystem.h"
#include "ardour/rc_configuration.h"
#include "ardour/filesystem_paths.h"
#include "pbd/strsplit.h"
#include "pbd/strsplit.h"
#include "pbd/unwind.h"
+#include "pbd/filesystem.h"
#include "ardour/amp.h"
#include "ardour/analyser.h"
SessionDirectory sdir(get_best_session_directory_for_new_source());
- sys::path p;
+ std::string p;
if (type == DataType::AUDIO) {
p = sdir.sound_path();
} else if (type == DataType::MIDI) {
return "";
}
- p /= name;
- return p.to_string();
+ return Glib::build_filename (p, name);
}
string
Session::peak_path (string base) const
{
- sys::path peakfile_path(_session_dir->peak_path());
- peakfile_path /= base + peakfile_suffix;
- return peakfile_path.to_string();
+ return Glib::build_filename (_session_dir->peak_path(), base + peakfile_suffix);
}
/** Return a unique name based on \a base for a new internal audio source */
SessionDirectory sdir((*i).path);
- string spath = sdir.sound_path().to_string();
+ string spath = sdir.sound_path();
/* note that we search *without* the extension so that
we don't end up both "Audio 1-1.wav" and "Audio 1-1.caf"
framepos_t to_do;
BufferSet buffers;
SessionDirectory sdir(get_best_session_directory_for_new_source ());
- const string sound_dir = sdir.sound_path().to_string();
+ const string sound_dir = sdir.sound_path();
framepos_t len = end - start;
bool need_block_size_reset = false;
string ext;
if (session_dirs.size() == 1) {
switch (type) {
case DataType::AUDIO:
- s.push_back ( _session_dir->sound_path().to_string());
+ s.push_back ( _session_dir->sound_path());
break;
case DataType::MIDI:
- s.push_back (_session_dir->midi_path().to_string());
+ s.push_back (_session_dir->midi_path());
break;
}
} else {
SessionDirectory sdir (i->path);
switch (type) {
case DataType::AUDIO:
- s.push_back (sdir.sound_path().to_string());
+ s.push_back (sdir.sound_path());
break;
case DataType::MIDI:
- s.push_back (sdir.midi_path().to_string());
+ s.push_back (sdir.midi_path());
break;
}
}
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <glibmm/fileutils.h>
+#include <glibmm/miscutils.h>
+
#include "pbd/error.h"
#include "pbd/compose.h"
#include "pbd/filesystem.h"
using namespace std;
using namespace PBD::sys;
-SessionDirectory::SessionDirectory (const path& session_path)
+SessionDirectory::SessionDirectory (const std::string& session_path)
: m_root_path(session_path)
{
{
bool is_new = false;
- vector<path> sub_dirs = sub_directories ();
- for (vector<path>::const_iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i)
+ vector<std::string> sub_dirs = sub_directories ();
+ for (vector<std::string>::const_iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i)
{
- try
- {
- if(create_directories(*i)) is_new = true;
+ if (Glib::file_test (*i, Glib::FILE_TEST_EXISTS)) {
+ is_new = false;
}
- catch (PBD::sys::filesystem_error& ex)
- {
- // log the error
- PBD::error << string_compose(_("Cannot create Session directory at path %1 Error: %2"), (*i).to_string(), ex.what()) << endmsg;
- // and rethrow
- throw ex;
+ if (g_mkdir_with_parents (i->c_str(), 0755) != 0) {
+ PBD::error << string_compose(_("Cannot create Session directory at path %1 Error: %2"), *i, g_strerror(errno)) << endmsg;
+
}
}
bool
SessionDirectory::is_valid () const
{
- if (!is_directory (m_root_path)) return false;
+ if (!Glib::file_test (m_root_path, Glib::FILE_TEST_IS_DIR)) return false;
- vector<path> sub_dirs = sub_directories ();
+ vector<std::string> sub_dirs = sub_directories ();
- for (vector<path>::iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i) {
- if (!is_directory (*i)) {
- PBD::warning << string_compose(_("Session subdirectory does not exist at path %1"), (*i).to_string()) << endmsg;
+ for (vector<std::string>::iterator i = sub_dirs.begin(); i != sub_dirs.end(); ++i) {
+ if (!Glib::file_test (*i, Glib::FILE_TEST_IS_DIR)) {
+ PBD::warning << string_compose(_("Session subdirectory does not exist at path %1"), *i) << endmsg;
return false;
}
}
return true;
}
-const path
+const std::string
SessionDirectory::old_sound_path () const
{
- return m_root_path / old_sound_dir_name;
+ return Glib::build_filename (m_root_path, old_sound_dir_name);
}
-const path
+const std::string
SessionDirectory::sources_root () const
{
+ // fix this later
path p = m_root_path;
if (p.leaf() == ".") {
p = PBD::sys::get_absolute_path (m_root_path);
}
-
+
const string legalized_root (legalize_for_path (p.leaf ()));
- return m_root_path / interchange_dir_name / legalized_root;
+ path sources_root_path = m_root_path / interchange_dir_name / legalized_root;
+ return sources_root_path.to_string ();
}
-const path
+const std::string
SessionDirectory::sound_path () const
{
- if(is_directory (old_sound_path ())) return old_sound_path();
+ if (Glib::file_test (old_sound_path (), Glib::FILE_TEST_IS_DIR)) return old_sound_path();
// the new style sound directory
- return sources_root() / sound_dir_name;
+ return Glib::build_filename (sources_root(), sound_dir_name);
}
-const path
+const std::string
SessionDirectory::midi_path () const
{
- return sources_root() / midi_dir_name;
+ return Glib::build_filename (sources_root(), midi_dir_name);
}
-const path
+const std::string
SessionDirectory::midi_patch_path () const
{
- return sources_root() / midi_patch_dir_name;
+ return Glib::build_filename (sources_root(), midi_patch_dir_name);
}
-const path
+const std::string
SessionDirectory::peak_path () const
{
- return m_root_path / peak_dir_name;
+ return Glib::build_filename (m_root_path, peak_dir_name);
}
-const path
+const std::string
SessionDirectory::dead_path () const
{
- return m_root_path / dead_dir_name;
+ return Glib::build_filename (m_root_path, dead_dir_name);
}
-const path
+const std::string
SessionDirectory::export_path () const
{
- return m_root_path / export_dir_name;
+ return Glib::build_filename (m_root_path, export_dir_name);
}
-const vector<path>
+const vector<std::string>
SessionDirectory::sub_directories () const
{
- vector<path> tmp_paths;
+ vector<std::string> tmp_paths;
tmp_paths.push_back (sound_path ());
tmp_paths.push_back (midi_path ());
int
Session::second_stage_init ()
{
- AudioFileSource::set_peak_dir (_session_dir->peak_path().to_string());
+ AudioFileSource::set_peak_dir (_session_dir->peak_path());
if (!_is_new) {
if (load_state (_current_snapshot_name)) {
SearchPath raid_search_path;
for (vector<space_and_path>::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) {
- raid_search_path += sys::path((*i).path);
+ raid_search_path += (*i).path;
}
return raid_search_path.to_string ();
SearchPath midi_search_path;
for (SearchPath::const_iterator i = search_path.begin(); i != search_path.end(); ++i) {
- sp.path = (*i).to_string ();
+ sp.path = *i;
sp.blocks = 0; // not needed
session_dirs.push_back (sp);
{
string dir;
- dir = session_directory().peak_path().to_string();
+ dir = session_directory().peak_path();
if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) {
error << string_compose(_("Session: cannot create session peakfile folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
- dir = session_directory().sound_path().to_string();
+ dir = session_directory().sound_path();
if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) {
error << string_compose(_("Session: cannot create session sounds dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
- dir = session_directory().midi_path().to_string();
+ dir = session_directory().midi_path();
if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) {
error << string_compose(_("Session: cannot create session midi dir \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
- dir = session_directory().dead_path().to_string();
+ dir = session_directory().dead_path();
if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) {
error << string_compose(_("Session: cannot create session dead sounds folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
return -1;
}
- dir = session_directory().export_path().to_string();
+ dir = session_directory().export_path();
if (g_mkdir_with_parents (dir.c_str(), 0755) < 0) {
error << string_compose(_("Session: cannot create session export folder \"%1\" (%2)"), dir, strerror (errno)) << endmsg;
const string old_xml_filename = legalize_for_path (old_name) + statefile_suffix;
const string new_xml_filename = legalize_for_path (new_name) + statefile_suffix;
- const sys::path old_xml_path = _session_dir->root_path() / old_xml_filename;
- const sys::path new_xml_path = _session_dir->root_path() / new_xml_filename;
+ const sys::path old_xml_path(Glib::build_filename (_session_dir->root_path(), old_xml_filename));
+ const sys::path new_xml_path(Glib::build_filename (_session_dir->root_path(), new_xml_filename));
try
{
}
}
- setup_raid_path(_session_dir->root_path().to_string());
+ setup_raid_path(_session_dir->root_path());
if ((prop = node.property (X_("id-counter"))) != 0) {
uint64_t x;
Session::get_best_session_directory_for_new_source ()
{
vector<space_and_path>::iterator i;
- string result = _session_dir->root_path().to_string();
+ string result = _session_dir->root_path();
/* handle common case without system calls */
++nexti;
SessionDirectory sdir ((*i).path);
- audio_path += sdir.sound_path().to_string();
+ audio_path += sdir.sound_path();
if (nexti != session_dirs.end()) {
audio_path += ':';
++nexti;
SessionDirectory sdir ((*i).path);
- midi_path += sdir.midi_path().to_string();
+ midi_path += sdir.midi_path();
if (nexti != session_dirs.end()) {
midi_path += ':';
const string history_filename = legalize_for_path (snapshot_name) + history_suffix;
const string backup_filename = history_filename + backup_suffix;
- const sys::path xml_path = _session_dir->root_path() / history_filename;
- const sys::path backup_path = _session_dir->root_path() / backup_filename;
+ const sys::path xml_path(Glib::build_filename (_session_dir->root_path(), history_filename));
+ const sys::path backup_path(Glib::build_filename (_session_dir->root_path(), backup_filename));
if (sys::exists (xml_path)) {
try
}
const string xml_filename = legalize_for_path (snapshot_name) + history_suffix;
- const sys::path xml_path = _session_dir->root_path() / xml_filename;
+ const sys::path xml_path(Glib::build_filename (_session_dir->root_path(), xml_filename));
info << "Loading history from " << xml_path.to_string() << endmsg;
string newstr;
bool first = true;
- string const old_sources_root = _session_dir->sources_root().to_string ();
+ string const old_sources_root = _session_dir->sources_root();
#define RENAME ::rename
boost::shared_ptr<FileSource> fs = boost::dynamic_pointer_cast<FileSource> (i->second);
if (fs) {
string p = fs->path ();
- boost::replace_all (p, old_sources_root, _session_dir->sources_root().to_string ());
+ boost::replace_all (p, old_sources_root, _session_dir->sources_root());
fs->set_path (p);
}
}
}
void
-get_state_files_in_directory (const sys::path & directory_path,
- vector<sys::path> & result)
+get_state_files_in_directory (const std::string & directory_path,
+ vector<std::string> & result)
{
Glib::PatternSpec state_file_pattern('*' + string(statefile_suffix));
}
vector<string>
-get_file_names_no_extension (const vector<sys::path> & file_paths)
+get_file_names_no_extension (const vector<std::string> & file_paths)
{
vector<string> result;
create_session_directory (const string& session_directory_path)
{
SessionDirectory sdir(session_directory_path);
-
- try
- {
- // create all the required session directories
- sdir.create();
- }
- catch(sys::filesystem_error& ex)
- {
- // log the exception
- warning << string_compose
- (
- _("Unable to create session directory at path %1 : %2"),
- session_directory_path,
- ex.what()
- );
-
- return false;
- }
-
- // successfully created the session directory
+ sdir.create();
return true;
}
#include "pbd/locale_guard.h"
#include "pbd/pathscanner.h"
+#include "pbd/filesystem.h"
#include "ardour/vst_plugin.h"
#include "ardour/vestige/aeffectx.h"
#include "ardour/session.h"
#include <algorithm>
#include <glibmm/fileutils.h>
+#include <glibmm/miscutils.h>
#include <glibmm/pattern.h>
#include "pbd/compose.h"
namespace PBD {
void
-get_files_in_directory (const sys::path& directory_path, vector<string>& result)
+get_files_in_directory (const std::string& directory_path, vector<string>& result)
{
- if (!is_directory(directory_path)) return;
+ if (!Glib::file_test (directory_path, Glib::FILE_TEST_IS_DIR)) return;
try
{
- Glib::Dir dir(directory_path.to_string());
+ Glib::Dir dir(directory_path);
std::copy(dir.begin(), dir.end(), std::back_inserter(result));
}
catch (Glib::FileError& err)
}
void
-find_matching_files_in_directory (const sys::path& directory,
+find_matching_files_in_directory (const std::string& directory,
const Glib::PatternSpec& pattern,
- vector<sys::path>& result)
+ vector<std::string>& result)
{
vector<string> tmp_files;
{
if (!pattern.match(*file_iter)) continue;
- sys::path full_path(directory);
- full_path /= *file_iter;
+ std::string full_path(directory);
+ full_path = Glib::build_filename (full_path, *file_iter);
result.push_back(full_path);
}
}
void
-find_matching_files_in_directories (const vector<sys::path>& paths,
+find_matching_files_in_directories (const vector<std::string>& paths,
const Glib::PatternSpec& pattern,
- vector<sys::path>& result)
+ vector<std::string>& result)
{
- for (vector<sys::path>::const_iterator path_iter = paths.begin();
+ for (vector<std::string>::const_iterator path_iter = paths.begin();
path_iter != paths.end();
++path_iter)
{
void
find_matching_files_in_search_path (const SearchPath& search_path,
const Glib::PatternSpec& pattern,
- vector<sys::path>& result)
+ vector<std::string>& result)
{
find_matching_files_in_directories (search_path, pattern, result);
}
bool
find_file_in_search_path(const SearchPath& search_path,
const string& filename,
- sys::path& result)
+ std::string& result)
{
- vector<sys::path> tmp;
+ vector<std::string> tmp;
Glib::PatternSpec tmp_pattern(filename);
find_matching_files_in_search_path (search_path, tmp_pattern, tmp);
(
"Found more than one file matching %1 in search path %2",
filename,
- search_path.to_string ()
+ search_path ()
)
<< endmsg;
}
* @param result A vector of filenames.
*/
void
-get_files_in_directory (const sys::path& path,
+get_files_in_directory (const std::string& path,
std::vector<std::string>& result);
/**
* @param result A vector in which to place the resulting matches.
*/
void
-find_matching_files_in_directory (const sys::path& directory,
+find_matching_files_in_directory (const std::string& directory,
const Glib::PatternSpec& pattern,
- std::vector<sys::path>& result);
+ std::vector<std::string>& result);
/**
* Takes a number of directory paths and returns all the files matching
* @param result A vector in which to place the resulting matches.
*/
void
-find_matching_files_in_directories (const std::vector<sys::path>& directory_paths,
+find_matching_files_in_directories (const std::vector<std::string>& directory_paths,
const Glib::PatternSpec& pattern,
- std::vector<sys::path>& result);
+ std::vector<std::string>& result);
/**
* Takes a SearchPath and puts a list of all the files in the search path
void
find_matching_files_in_search_path (const SearchPath& search_path,
const Glib::PatternSpec& pattern,
- std::vector<sys::path>& result);
+ std::vector<std::string>& result);
/**
* Takes a search path and a file name and place the full path
bool
find_file_in_search_path (const SearchPath& search_path,
const std::string& filename,
- sys::path& result);
+ std::string& result);
} // namespace PBD
#include <string>
#include <vector>
-#include "pbd/filesystem.h"
-
namespace PBD {
/**
* The SearchPath class does not test whether the paths exist
* or are directories. It is basically just a container.
*/
-class SearchPath : public std::vector<sys::path>
+class SearchPath : public std::vector<std::string>
{
public:
/**
*/
SearchPath (const std::string& search_path);
- /**
- * Initialize SearchPath from a sys::path.
- *
- * @param directory_path A directory path.
- */
- SearchPath (const PBD::sys::path& directory_path);
-
/**
* Initialize SearchPath from a vector of paths that may or may
* not exist.
*
* @param paths A vector of paths.
*/
- SearchPath (const std::vector<PBD::sys::path>& paths);
+ SearchPath (const std::vector<std::string>& paths);
/**
* @return a search path string.
/**
* Add another directory path to the search path.
*/
- SearchPath& operator+= (const PBD::sys::path& directory_path);
+ SearchPath& operator+= (const std::string& directory_path);
/**
* Concatenate another SearchPath onto this.
/**
* Add another path to the search path.
*/
- SearchPath& operator+ (const PBD::sys::path& directory_path);
+ SearchPath& operator+ (const std::string& directory_path);
/**
* Add a sub-directory to each path in the search path.
SearchPath& add_subdirectory_to_paths (const std::string& subdir);
protected:
- void add_directory (const sys::path& directory_path);
- void add_directories (const std::vector<PBD::sys::path>& paths);
+
+ void add_directory (const std::string& directory_path);
+ void add_directories (const std::vector<std::string>& paths);
};
} // namespace PBD
*/
+#include <glibmm/miscutils.h>
+
#include "pbd/tokenizer.h"
#include "pbd/search_path.h"
#include "pbd/error.h"
SearchPath::SearchPath (const string& path)
{
- vector<sys::path> tmp;
+ vector<std::string> tmp;
if (tokenize (path, string(path_delimiter), std::back_inserter (tmp))) {
add_directories (tmp);
}
}
-SearchPath::SearchPath (const sys::path& directory_path)
-{
- add_directory (directory_path);
-}
-
-SearchPath::SearchPath (const vector<sys::path>& paths)
+SearchPath::SearchPath (const vector<std::string>& paths)
{
add_directories (paths);
}
void
-SearchPath::add_directory (const sys::path& directory_path)
+SearchPath::add_directory (const std::string& directory_path)
{
- // test for existance and warn etc?
- push_back(directory_path);
+ if (!directory_path.empty()) {
+ push_back(directory_path);
+ }
}
void
-SearchPath::add_directories (const vector<sys::path>& paths)
+SearchPath::add_directories (const vector<std::string>& paths)
{
- for(vector<sys::path>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
+ for(vector<std::string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
add_directory (*i);
}
}
{
string path;
- for (vector<sys::path>::const_iterator i = begin(); i != end(); ++i) {
- path += (*i).to_string();
+ for (vector<std::string>::const_iterator i = begin(); i != end(); ++i) {
+ path += *i;
path += path_delimiter;
}
}
SearchPath&
-SearchPath::operator+= (const sys::path& directory_path)
+SearchPath::operator+= (const std::string& directory_path)
{
add_directory (directory_path);
return *this;
}
SearchPath&
-SearchPath::operator+ (const sys::path& directory_path)
+SearchPath::operator+ (const std::string& directory_path)
{
add_directory (directory_path);
return *this;
SearchPath&
SearchPath::add_subdirectory_to_paths (const string& subdir)
{
- for (vector<sys::path>::iterator i = begin(); i != end(); ++i) {
+ for (vector<std::string>::iterator i = begin(); i != end(); ++i) {
// should these new paths just be added to the end of
// the search path rather than replace?
- *i /= subdir;
+ *i = Glib::build_filename (*i, subdir);
}
return *this;
#include "pbd/failed_constructor.h"
#include "pbd/pathscanner.h"
#include "pbd/xml++.h"
+#include "pbd/filesystem.h"
#include "midi++/port.h"
#include "midi++/manager.h"
{
vector<string *> *midi_maps;
PathScanner scanner;
- SearchPath spath (system_midi_map_search_path());
- spath += user_midi_map_directory ();
+ SearchPath spath (system_midi_map_search_path().to_string());
+ spath += user_midi_map_directory ().to_string();
midi_maps = scanner (spath.to_string(), midi_map_filter, 0, false, true);
devinfo_search_path ()
{
bool devinfo_path_defined = false;
- sys::path spath_env (Glib::getenv (devinfo_env_variable_name, devinfo_path_defined));
+ std::string spath_env (Glib::getenv (devinfo_env_variable_name, devinfo_path_defined));
if (devinfo_path_defined) {
return spath_env;
#include "pbd/error.h"
#include "pbd/pathscanner.h"
#include "pbd/replace_all.h"
+#include "pbd/filesystem.h"
#include "ardour/filesystem_paths.h"
devprofile_search_path ()
{
bool devprofile_path_defined = false;
- sys::path spath_env (Glib::getenv (devprofile_env_variable_name, devprofile_path_defined));
+ std::string spath_env (Glib::getenv (devprofile_env_variable_name, devprofile_path_defined));
if (devprofile_path_defined) {
return spath_env;
PBD::info << "OSC @ " << get_server_url () << endmsg;
- PBD::sys::path url_file;
+ std::string url_file;
if (find_file_in_search_path (ardour_config_search_path(), "osc_url", url_file)) {
- _osc_url_file = url_file.to_string();
+ _osc_url_file = url_file;
ofstream urlfile;
urlfile.open(_osc_url_file.c_str(), ios::trunc);