(Unicode C) Reassemble a Previously Split File
Demonstrates how to reassemble a previously split file.
#include <C_CkFileAccessW.h>
void ChilkatSample(void)
{
HCkFileAccessW fac;
BOOL success;
const wchar_t *reassembledFilename;
const wchar_t *partPrefix;
const wchar_t *partExtension;
const wchar_t *srcDirPath;
fac = CkFileAccessW_Create();
// Any type of file may be reassembled. It doesn't matter if it's
// a binary file or a text file.
reassembledFilename = L"hamlet2.xml";
partPrefix = L"hamlet";
partExtension = L"spl";
srcDirPath = L".";
// Reassembles the original file from hamlet1.spl, hamlet2.spl, ...
success = CkFileAccessW_ReassembleFile(fac,srcDirPath,partPrefix,partExtension,reassembledFilename);
if (success == TRUE) {
wprintf(L"Success.\n");
}
else {
wprintf(L"%s\n",CkFileAccessW_lastErrorText(fac));
}
CkFileAccessW_Dispose(fac);
}
|