From c18e2b649691e393f0c6e0fcd9af288b68d7d9b5 Mon Sep 17 00:00:00 2001 From: Patrick Venture Date: Wed, 21 Nov 2018 14:19:28 -0800 Subject: add dynamic library interface to enable testing Add interface defining the methods for dynamic linking to enable testing. Change-Id: If4d090d3cedc019b426435a1f651191803bfc1a9 Signed-off-by: Patrick Venture --- fs.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 fs.hpp (limited to 'fs.hpp') diff --git a/fs.hpp b/fs.hpp new file mode 100644 index 0000000..2fb574e --- /dev/null +++ b/fs.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include +#include +#include + +namespace blobs +{ +using PathMatcher = std::function; + +/** + * Returns a list of library paths. Checks against match method. + * + * TODO: Can be dropped if we implement a clean fs wrapper for test injection. + * + * @param[in] path - the path to search + * @param[in] check - the function to call to check the path + * @return a list of paths that match the criteria + */ +std::vector getLibraryList(const std::string& path, + PathMatcher check); + +} // namespace blobs -- cgit v1.2.3