identify_magic overloads
Declared in <llvm/BinaryFormat/Magic.h>
Identify the type of a binary file based on how magical it is.
file_magic
identify_magic(StringRef magic);
» more...
Get and identify path's type based on its content.
std::error_code
identify_magic(
Twine const& path,
file_magic& result);
» more...
| Name | Description |
|---|---|
| magic | Leading bytes of the file used for magic identification. |
| path | Input path. |
| result | Set to the type of file, or file_magic::unknown. |