Libmagicxx v5.1.1
A C++ wrapper library over the Magic Number Recognition Library.
|
Namespaces | |
namespace | detail |
Classes | |
class | empty_path |
class | invalid_path |
class | magic |
The magic class provides a C++ wrapper over the Magic Number Recognition Library. The magic class is used to identify the type of a file, if the following steps have been completed;. More... | |
class | magic_exception |
The base class for all exceptions thrown by the magic class. More... | |
class | magic_file_error |
class | magic_is_closed |
class | magic_load_error |
class | magic_open_error |
class | magic_set_flags_error |
class | magic_set_param_error |
Functions | |
std::string | to_string (const magic::types_of_files_t &types_of_files, const std::string &type_separator=" -> ", const std::string &file_separator="\n") |
Convert the magic::types_of_files_t to string. | |
std::string | to_string (const magic::expected_file_type_t &expected_file_type) |
Convert the magic::expected_file_type_t to string. | |
std::string | to_string (const magic::expected_types_of_files_t &expected_types_of_files, const std::string &type_separator=" -> ", const std::string &file_separator="\n") |
Convert the magic::expected_types_of_files_t to string. | |
std::string | to_string (magic::flags flag) |
Convert the magic::flags to string. | |
std::string | to_string (const magic::flags_container_t &flags, const std::string &separator=", ") |
Convert the magic::flags_container_t to string. | |
std::string | to_string (magic::parameters parameter) |
Convert the magic::parameters to string. | |
std::string | to_string (const magic::parameter_value_map_t ¶meters, const std::string &value_separator=": ", const std::string ¶meter_separator=", ") |
Convert the magic::parameter_value_map_t to string. | |
std::string recognition::to_string | ( | const magic::expected_file_type_t & | expected_file_type | ) |
Convert the magic::expected_file_type_t to string.
[in] | expected_file_type | The expected type of the file. |
std::string recognition::to_string | ( | const magic::expected_types_of_files_t & | expected_types_of_files, |
const std::string & | type_separator = " -> ", | ||
const std::string & | file_separator = "\n" ) |
Convert the magic::expected_types_of_files_t to string.
[in] | expected_types_of_files | The expected types of each file. |
[in] | type_separator | The separator between the file and its expected type, default is " -> ". |
[in] | file_separator | The separator between the files, default is "\n". |
std::string recognition::to_string | ( | const magic::flags_container_t & | flags, |
const std::string & | separator = ", " ) |
Convert the magic::flags_container_t to string.
[in] | flags | The flags. |
[in] | separator | The separator between the flags, default is ", ". |
std::string recognition::to_string | ( | const magic::parameter_value_map_t & | parameters, |
const std::string & | value_separator = ": ", | ||
const std::string & | parameter_separator = ", " ) |
Convert the magic::parameter_value_map_t to string.
[in] | parameters | The parameters with corresponding values. |
[in] | value_separator | The separator between the parameter and its value, default is ": ". |
[in] | parameter_separator | The separator between the parameters, default is ", ". |
std::string recognition::to_string | ( | const magic::types_of_files_t & | types_of_files, |
const std::string & | type_separator = " -> ", | ||
const std::string & | file_separator = "\n" ) |
Convert the magic::types_of_files_t to string.
[in] | types_of_files | The types of each file. |
[in] | type_separator | The separator between the file and its type, default is " -> ". |
[in] | file_separator | The separator between the files, default is "\n". |
std::string recognition::to_string | ( | magic::flags | flag | ) |
std::string recognition::to_string | ( | magic::parameters | parameter | ) |
Convert the magic::parameters to string.
[in] | parameter | The parameter. |