summaryrefslogtreecommitdiff
path: root/src/dcp.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-24 11:16:08 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-24 11:16:08 +0100
commit04def4c193777d7a6cbd306d0a3ba3944335e444 (patch)
tree5a36755469ac1c2bb4fd9af2e24a0076fe09f845 /src/dcp.cc
parentc178a9d89e489e37cd1db73c6b0d470616937966 (diff)
Add new method.
Diffstat (limited to 'src/dcp.cc')
-rw-r--r--src/dcp.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index fb0f2625..f99d3433 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -65,6 +65,7 @@
using std::string;
using std::list;
+using std::vector;
using std::cout;
using std::make_pair;
using std::map;
@@ -504,3 +505,16 @@ DCP::assets () const
return assets;
}
+
+/** Given a list of files that make up 1 or more DCPs, return the DCP directories */
+vector<boost::filesystem::path>
+DCP::directories_from_files (vector<boost::filesystem::path> files)
+{
+ vector<boost::filesystem::path> d;
+ BOOST_FOREACH (boost::filesystem::path i, files) {
+ if (i.filename() == "ASSETMAP" || i.filename() == "ASSETMAP.xml") {
+ d.push_back (i.parent_path ());
+ }
+ }
+ return d;
+}