cpp-filetype
Loading...
Searching...
No Matches
type.hpp
1
#ifndef FILETYPE_TYPE_HPP
2
#define FILETYPE_TYPE_HPP
3
4
#include <string>
5
6
namespace
filetype {
7
9
struct
Type {
10
std::string
mime
;
11
std::string
extension
;
12
13
Type(
const
std::string& m,
const
std::string& ext) :
mime
(m),
extension
(ext) {}
14
15
bool
operator==(
const
Type
& other)
const
{
16
return
mime
== other.
mime
&&
extension
== other.
extension
;
17
}
18
};
19
20
}
// namespace filetype
21
22
#endif
// FILETYPE_TYPE_HPP
filetype::Type
Common Type struct used across all file formats.
Definition
type.hpp:9
filetype::Type::extension
std::string extension
File extension without the dot.
Definition
type.hpp:11
filetype::Type::mime
std::string mime
MIME type of the file.
Definition
type.hpp:10
include
filetype
type.hpp
Generated by
1.13.2