MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / compiledFileNeedsUpdate

Function compiledFileNeedsUpdate

Engine/source/i18n/lang.cpp:483–502  ·  view source on GitHub ↗

lang_ localization

Source from the content-addressed store, hash-verified

481
482//lang_ localization
483bool compiledFileNeedsUpdate(UTF8* filename)
484{
485 Torque::Path filePath = Torque::Path(filename);
486 Torque::FS::FileNodeRef sourceFile = Torque::FS::GetFileNode(filePath);
487 Torque::Path compiledPath = Torque::Path(filePath);
488 compiledPath.setExtension("lso");
489 Torque::FS::FileNodeRef compiledFile = Torque::FS::GetFileNode(compiledPath);
490
491 Torque::Time sourceModifiedTime, compiledModifiedTime;
492
493 if (sourceFile != NULL)
494 sourceModifiedTime = sourceFile->getModifiedTime();
495
496 if (compiledFile != NULL)
497 compiledModifiedTime = compiledFile->getModifiedTime();
498
499 if (sourceModifiedTime > compiledModifiedTime)
500 return true;
501 return false;
502}
503
504ConsoleFunction(CompileLanguage, void, 2, 3, "(string inputFile, [bool createMap]) Compiles a LSO language file."
505 " if createIndex is true, will also create languageMap.cs with"

Callers 1

lang.cppFile · 0.85

Calls 4

GetFileNodeFunction · 0.85
getModifiedTimeMethod · 0.80
PathClass · 0.50
setExtensionMethod · 0.45

Tested by

no test coverage detected