使用lua实现npk操作

This commit is contained in:
2025-09-03 09:34:30 +08:00
parent 25e7cff75d
commit 80390e48a7
10 changed files with 34 additions and 354 deletions
+8 -1
View File
@@ -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);