8#include <boost/algorithm/string.hpp>
9#include <boost/regex.hpp>
23 if (path.find(
"\\") == std::string::npos) {
41 const std::string &prefix)
const {
42 boost::regex re(regex);
44 return boost::regex_replace(path, re, prefix);
56 const std::string &format)
const {
58 return boost::replace_all_copy(path, search, format);
virtual std::string transformArchivePath(const std::string &path) const
Transform's the archive path based on operating system used.
std::string replaceAllOccurences(const std::string &path, const std::string &search, const std::string &format) const
Replace all occurrences of the search string in the input with the format string.
virtual const std::string linuxPrefix() const =0
Obtain Linux prefix from facility file.
virtual const std::string macPrefix() const =0
Obtain Macintosh prefix from facility file.
virtual const std::string windowsPrefix() const =0
Obtain Windows prefix from the facility file.
virtual const std::string catalogPrefix() const =0
Obtain the regex prefix from the facility file.
std::string replacePrefix(const std::string &path, const std::string ®ex, const std::string &prefix) const
Replace the content of a string using regex.