26 #include <boost/filesystem.hpp>
37 static const std::regex mime_prefix(
"\\/(vnd|prs|x)(\\.|-)");
38 const auto mime_type_no_prefix = std::regex_replace(mime_type, mime_prefix,
"/");
39 static const std::vector<std::string> compressed_types = {
"application/7z-compressed",
50 static const std::vector<std::string> compressed_exts = {
51 ".7z",
".bz",
".bz2",
".gz",
".rar",
".tar",
".zip",
".tgz"};
53 boost::filesystem::path(location).extension().
string());
bool contains(const T &container, const U &element)
bool is_compressed_mime_type(const std::string &mime_type)
shared utility for mime-types
bool is_compressed_file_extension(const std::string &location)