diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-24 11:16:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-24 11:16:08 +0100 |
| commit | 04def4c193777d7a6cbd306d0a3ba3944335e444 (patch) | |
| tree | 5a36755469ac1c2bb4fd9af2e24a0076fe09f845 | |
| parent | c178a9d89e489e37cd1db73c6b0d470616937966 (diff) | |
Add new method.
| -rw-r--r-- | src/dcp.cc | 14 | ||||
| -rw-r--r-- | src/dcp.h | 2 |
2 files changed, 16 insertions, 0 deletions
@@ -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; +} @@ -123,6 +123,8 @@ public: return _standard; } + static std::vector<boost::filesystem::path> directories_from_files (std::vector<boost::filesystem::path> files); + private: /** Write the PKL file. |
