1 /* Detect MIME file type */
18 /* Read and parse "mime.types" file content */
19 bool parse_db(NotNull<czstring> sz_path);
21 /* Lookup MIME type by FS path */
22 const std::string *lookup(const std::string &path) const;
24 /* Get file extension from path. Return path.end() if no extension. */
25 static std::string::const_iterator get_ext(const std::string &path);
31 explicit Key(/* in/out */ std::string &string) {m_string.swap(string);}
32 explicit Key(const char *p) : m_p(p) {}
33 const char *c_str() const { return m_p ? m_p : m_string.c_str(); }
37 const char *m_p{nullptr};
44 bool operator ()(const Key &key1, const Key &key2) const;
46 std::map<Key, std::string, Less> m_map;