#include "common/plugins/plugin_list_parser.h"
-#include <boost/algorithm/string/classification.hpp>
-#include <boost/algorithm/string/split.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
-#include <boost/system/error_code.hpp>
+#include <manifest_parser/utils/string_util.h>
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+#include <filesystem>
+
+namespace fs = std::filesystem;
namespace common_installer {
PluginInfo::PluginInfo(std::string type,
std::string name,
- boost::filesystem::path path,
+ std::filesystem::path path,
bool vitalness)
: type_(std::move(type)),
name_(std::move(name)),
const std::string& PluginInfo::name() const { return name_; }
-const boost::filesystem::path& PluginInfo::path() const { return path_; }
+const std::filesystem::path& PluginInfo::path() const { return path_; }
bool PluginInfo::vitalness() const {
return vitalness_;
}
bool PluginsListParser::ReadLinesFromFile(std::vector<std::string>* lines) {
- for (bf::directory_iterator file(path_); file != bf::directory_iterator();
+ for (fs::directory_iterator file(path_); file != fs::directory_iterator();
++file) {
- bs::error_code error;
- bool is_file = bf::is_regular_file(file->path(), error);
+ std::error_code error;
+ bool is_file = fs::is_regular_file(file->path(), error);
if (!is_file || error)
continue;
}
plugin_info_list_.push_back(std::make_shared<PluginInfo>(std::move(type),
- std::move(name), boost::filesystem::path(std::move(path)),
+ std::move(name), std::filesystem::path(std::move(path)),
(vitalness.compare("true") == 0 ? true : false)));
}
static const char kPartsInLine = 3;
std::vector<std::string> _parts;
- boost::algorithm::split(_parts, line, boost::algorithm::is_any_of(";"));
+ parser::utils::Split(_parts, line, ';');
if (_parts.size() != kPartsInLine && _parts.size() != kPartsInLine + 1) {
LOG(ERROR) << "Invalid number of parts";