| 11 | } |
| 12 | |
| 13 | bool LfdArchive::create(const char *archivePath) |
| 14 | { |
| 15 | m_archiveOpen = m_file.open(archivePath, Stream::MODE_WRITE); |
| 16 | m_curFile = -1; |
| 17 | m_fileOffset = 0; |
| 18 | if (!m_archiveOpen) { return false; } |
| 19 | |
| 20 | // Write the directory. |
| 21 | LFD_Entry_t root = { 0 }; |
| 22 | m_file.writeBuffer(&root, sizeof(LFD_Entry_t)); |
| 23 | m_fileList.MASTERN = 0; |
| 24 | m_fileList.entries = nullptr; |
| 25 | |
| 26 | strcpy(m_archivePath, archivePath); |
| 27 | m_file.close(); |
| 28 | |
| 29 | return true; |
| 30 | } |
| 31 | |
| 32 | bool LfdArchive::open(const char *archivePath) |
| 33 | { |
nothing calls this directly
no test coverage detected