}
}
+void
+copy_recurse(const std::string & from_path, const std::string & to_dir)
+{
+ vector<string> files;
+ find_files_matching_filter (files, from_path, accept_all_files, 0, false, true, true);
+
+ const size_t prefix_len = from_path.size();
+ for (vector<string>::iterator i = files.begin(); i != files.end(); ++i) {
+ std::string from = *i;
+ std::string to = Glib::build_filename (to_dir, (*i).substr(prefix_len));
+ g_mkdir_with_parents (Glib::path_get_dirname (to).c_str(), 0755);
+ copy_file (from, to);
+ }
+}
+
std::string
get_absolute_path (const std::string & p)
{
*/
LIBPBD_API void copy_files(const std::string & from_path, const std::string & to_dir);
+/**
+ * Attempt to copy all regular files from from_path to a new directory.
+ */
+LIBPBD_API void copy_recurse(const std::string & from_path, const std::string & to_dir);
+
/**
* Take a (possibly) relative path and make it absolute
* @return An absolute path