ΒΆstd::error_code identify_magic(
    const llvm::Twine& path,
    llvm::file_magic& result)

Description

Get and identify \a path's type based on its content.

Declared at: llvm/include/llvm/BinaryFormat/Magic.h:78

Parameters

const llvm::Twine& path
Input path.
llvm::file_magic& result
Set to the type of file, or file_magic::unknown.

Returns

errc::success if result has been successfully set, otherwise a platform-specific error_code.