説明
The object-free Import Lua function imports a Lua table in XML format.
This function correlates to the Export function.
引数
- string:
This is a string containing the file name of the desired imported file. It should contain the file name, including the entire path. See the example below.
戻り値
- table:
This is the imported table.
例
This example imports the table exported using the example in the Export() function topic - please run that example before running this example.
|
return function () local importPath = GetPath(Enums.PathType.Library) .. "/BuildDetails.xml" if importPath == nil then ErrPrintf("The desired file does not exist. Please add it or adjust the requested file name.") else local importedTable = Import(importPath) if importedTable == nil then ErrPrintf("The import failed.") else Printf("CompileDate: " .. importedTable.CompileDate) Printf("CompileTime: " .. importedTable.CompileTime) Printf("BigVersion: " .. importedTable.BigVersion) Printf("HostType: " .. importedTable.HostType) Printf("HostSubType: " .. importedTable.HostSubType) Printf("CodeType: " .. importedTable.CodeType) end end end |