Lua
Lua
Reassemble a Previously Split File
Demonstrates how to reassemble a previously split file.Chilkat Lua Downloads
local chilkat = require("chilkat")
local fac = chilkat.FileAccess.new()
-- Any type of file may be reassembled. It doesn't matter if it's
-- a binary file or a text file.
local reassembledFilename = "hamlet2.xml"
local partPrefix = "hamlet"
local partExtension = "spl"
local srcDirPath = "."
-- Reassembles the original file from hamlet1.spl, hamlet2.spl, ...
local success = fac:reassemble_file(srcDirPath, partPrefix, partExtension, reassembledFilename)
if success then
print("Success.")
else
print(fac.last_error_text)
end