C++
C++
Reassemble a Previously Split File
Demonstrates how to reassemble a previously split file.Chilkat C++ Downloads
#include <CkFileAccess.h>
void ChilkatSample(void)
{
bool success = false;
CkFileAccess fac;
// Any type of file may be reassembled. It doesn't matter if it's
// a binary file or a text file.
const char *reassembledFilename = "hamlet2.xml";
const char *partPrefix = "hamlet";
const char *partExtension = "spl";
const char *srcDirPath = ".";
// Reassembles the original file from hamlet1.spl, hamlet2.spl, ...
success = fac.ReassembleFile(srcDirPath,partPrefix,partExtension,reassembledFilename);
if (success == true) {
std::cout << "Success." << "\r\n";
}
else {
std::cout << fac.lastErrorText() << "\r\n";
}
}