summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-05 00:51:09 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-05 00:51:09 +0200
commitafa092638250c72a92136b0b440bb6bb7c070702 (patch)
treebbcfbb05b7e3f53ca70aece49474a94343c58ccd /src/lib
parent6f23f3ff80fbd73cdaf183ce8bbdeeea0007ad6b (diff)
Add contains_assetmap()
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util.cc8
-rw-r--r--src/lib/util.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index cfeacdb92..609e92850 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -1187,3 +1187,11 @@ error_details(boost::system::error_code ec)
{
return String::compose("%1:%2:%3", ec.category().name(), ec.value(), ec.message());
}
+
+
+bool
+contains_assetmap(boost::filesystem::path dir)
+{
+ return boost::filesystem::is_regular_file(dir / "ASSETMAP") || boost::filesystem::is_regular_file(dir / "ASSETMAP.xml");
+}
+
diff --git a/src/lib/util.h b/src/lib/util.h
index c62b98df6..acdc861ae 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -127,6 +127,7 @@ extern std::string to_upper (std::string s);
extern void start_of_thread (std::string name);
extern void capture_asdcp_logs ();
extern std::string error_details(boost::system::error_code ec);
+extern bool contains_assetmap(boost::filesystem::path dir);
template <class T>
std::list<T>