|
Libmagicxx v10.0.3
A modern C++23 wrapper for libmagic — the library that powers the Unix file command.
|
Core file type identification functionality. More...

Topics | |
| Constructors | |
| Magic construction methods. | |
| Special Member Functions | |
| Move, copy, and destruction operations. | |
| Validity Checking | |
| Instance and database validation methods. | |
| Instance Control | |
| Instance lifecycle management. | |
| Flag Management | |
| Flag retrieval methods. | |
| Parameter Management | |
| Parameter retrieval methods. | |
| Static Utilities | |
| Static utility methods. | |
| File Identification | |
| Core file type detection methods. | |
| State Queries | |
| Instance state inspection methods. | |
| Database Loading | |
| Magic database loading methods. | |
| Open Reopen | |
| Instance initialization methods. | |
| Flag Modification | |
| Flag modification methods. | |
| Parameter Modification | |
| Parameter modification methods. | |
| String Conversion Functions | |
| Free functions for converting Magic types to human-readable strings. | |
| Exception Classes | |
| Exception hierarchy for Magic class error handling. | |
| Implementation Details | |
| Internal implementation details for the Magic class. | |
Classes | |
| class | Recognition::Magic |
| A modern C++23 wrapper for libmagic — the library that powers the Unix file command. More... | |
Core file type identification functionality.
The Magic class provides the primary interface for identifying file types using magic number analysis. It wraps the underlying libmagic C library with a modern, type-safe C++23 API.
Most methods have two overloads:
| enum Recognition::Magic::Flags : unsigned long long |
Flags for configuring Magic behavior.
The Flags enum controls how Magic identifies files and formats output. Flags can be combined using bitwise OR operations.
|
strong |
Parameters for tuning Magic behavior limits.
The Parameters enum provides access to various internal limits that control how deeply Magic analyzes files. Adjusting these can help balance between thoroughness and performance.