From 0c8c9cd98ddc28b662a4d3f777483e566e584c19 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 27 Sep 2015 16:18:31 +0300 Subject: server: api: added std::list metadata_setting_list(const std::string &module_name) to get list of all saved settings/metadata entries flat_files_metadata_module: implemented new metadata api call curl_downloader_module: reimplemented startup metadaats loading, still bad ... --- server/modules/metadata/flat_files/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'server/modules/metadata/flat_files/main.cpp') diff --git a/server/modules/metadata/flat_files/main.cpp b/server/modules/metadata/flat_files/main.cpp index d0e1040..5fe2182 100644 --- a/server/modules/metadata/flat_files/main.cpp +++ b/server/modules/metadata/flat_files/main.cpp @@ -163,6 +163,19 @@ bool storage_impl::remove(const std::string &module_name, const std::string &set return true; } +std::list storage_impl::setting_list(const std::string &module_name) +{ + std::list l; + std::string settings_dir = parsed_data_path; + settings_dir += "/"; + settings_dir += module_name; + for(auto i = boost::filesystem::directory_iterator(settings_dir), end = boost::filesystem::directory_iterator(); i != end; ++i) + { + l.push_back(i->path().string().substr(settings_dir.length() + 1)); + } + return l; +} + storage_impl::storage_impl() { } -- cgit v1.2.3