KiCad PCB EDA Suite
|
Functions | |
bool | fileStartsWithPrefix (const wxString &aFilePath, const wxString &aPrefix, bool aIgnoreWhitespace) |
Check if a file starts with a defined string. More... | |
bool | fileStartsWithBinaryHeader (const wxString &aFilePath, const std::vector< uint8_t > &aHeader) |
Check if a file starts with a defined binary header. More... | |
Variables | |
static const std::vector< uint8_t > | COMPOUND_FILE_HEADER { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1} |
bool PLUGIN_UTILS::fileStartsWithBinaryHeader | ( | const wxString & | aFilePath, |
const std::vector< uint8_t > & | aHeader | ||
) |
Check if a file starts with a defined binary header.
aFilePath | path to the file where we want to check the prefix |
aHeader | vector of bytes which need to match with the start of the file |
Definition at line 57 of file plugin_utils.cpp.
Referenced by SCH_ALTIUM_PLUGIN::checkFileHeader(), and ALTIUM_DESIGNER_PLUGIN::checkFileHeader().
bool PLUGIN_UTILS::fileStartsWithPrefix | ( | const wxString & | aFilePath, |
const wxString & | aPrefix, | ||
bool | aIgnoreWhitespace | ||
) |
Check if a file starts with a defined string.
aFilePath | path to the file where we want to check the prefix |
aPrefix | prefix string which should match with the initial characters in the file |
aIgnoreWhitespace | true if whitespace characters should be ignored before the prefix |
Definition at line 32 of file plugin_utils.cpp.
References text.
Referenced by PCAD_PLUGIN::CanReadBoard(), SCH_LEGACY_PLUGIN::CanReadLibrary(), SCH_LEGACY_PLUGIN::CanReadSchematicFile(), and CADSTAR_PCB_ARCHIVE_PLUGIN::checkBoardHeader().
|
static |
Definition at line 35 of file plugin_utils.h.
Referenced by SCH_ALTIUM_PLUGIN::checkFileHeader(), and ALTIUM_DESIGNER_PLUGIN::checkFileHeader().