|
KiCad PCB EDA Suite
|
Functions | |
| bool | fileStartsWithPrefix (const wxString &aFilePath, const wxString &aPrefix, bool aIgnoreWhitespace) |
| Check if a file starts with a defined string. | |
| bool | fileHasBinaryHeader (const wxString &aFilePath, const std::vector< uint8_t > &aHeader, size_t aOffset=0) |
| Check if a file starts with a defined binary header. | |
Variables | |
| const std::vector< uint8_t > | COMPOUND_FILE_HEADER |
| KICOMMON_API bool IO_UTILS::fileHasBinaryHeader | ( | const wxString & | aFilePath, |
| const std::vector< uint8_t > & | aHeader, | ||
| size_t | aOffset = 0 ) |
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. |
| aOffset | offset in the file where the header should be checked. |
Definition at line 59 of file io_utils.cpp.
Referenced by checkFileHeader(), PCB_IO_ALTIUM_DESIGNER::checkFileHeader(), and SCH_IO_ALTIUM::isBinaryFile().
| KICOMMON_API bool IO_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 34 of file io_utils.cpp.
References text.
Referenced by PCB_IO_PCAD::CanReadBoard(), SCH_IO_KICAD_LEGACY::CanReadLibrary(), SCH_IO_KICAD_LEGACY::CanReadSchematicFile(), PCB_IO_CADSTAR_ARCHIVE::checkBoardHeader(), and SCH_IO_ALTIUM::isASCIIFile().
| KICOMMON_API const std::vector< uint8_t > IO_UTILS::COMPOUND_FILE_HEADER |
Definition at line 31 of file io_utils.cpp.
Referenced by PCB_IO_ALTIUM_DESIGNER::checkFileHeader(), and SCH_IO_ALTIUM::isBinaryFile().