MCPcopy Create free account
hub / github.com/DavidColson/Polybox / SaveImportTable

Function SaveImportTable

source/asset_importer.cpp:547–560  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545// ***********************************************************************
546
547bool SaveImportTable(AssetImportTable* pTable, String project) {
548 StringBuilder builder(g_pArenaFrame);
549
550 for (i64 i = 0; i < pTable->table.tableSize; i++) {
551 HashNode<String, ImportTableAsset>& node = pTable->table.pTable[i];
552 if (node.hash != UNUSED_HASH) {
553 builder.AppendFormat("\"%S\" \"%S\" %d %s %llu\n", node.key, node.value.outputPath, node.value.importFormat, node.value.enableAutoImport ? "1" : "0", node.value.lastImportTime);
554 }
555 }
556 String importTablePath = TempPrint("system/%S/import_table.txt", project);
557 String fileContent = builder.CreateString(g_pArenaFrame);
558 WriteWholeFile(importTablePath, fileContent.pData, fileContent.length);
559 return true;
560}
561
562// ***********************************************************************
563

Callers 2

LoadAppFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected