使用lua实现npk操作
This commit is contained in:
@@ -10,6 +10,13 @@ function M.extract_npk_files(npkFileName, outputPath)
|
||||
|
||||
local ret = npk:openPakFile(npkFileName)
|
||||
if(not ret) then
|
||||
print("Can't open npk file:" .. npkFileName)
|
||||
return false
|
||||
end
|
||||
|
||||
ret = createEmptyPath(outputPath)
|
||||
if(not ret) then
|
||||
print("Can't create ouput path: " .. outputPath)
|
||||
return false
|
||||
end
|
||||
|
||||
@@ -19,7 +26,7 @@ function M.extract_npk_files(npkFileName, outputPath)
|
||||
|
||||
local fileStream = npk:openFileStream(baseInfo:keyName())
|
||||
|
||||
print("keyName=" .. fileStream:name() .. "\n")
|
||||
print("keyName=" .. fileStream:name())
|
||||
|
||||
local diskFileName = outputPath .. "/" .. baseInfo:keyName()
|
||||
ret = forceCreatePathForFile(diskFileName);
|
||||
|
||||
Reference in New Issue
Block a user