Sample code for 30+ languages & platforms
Unicode C

Reassemble a Previously Split File

Demonstrates how to reassemble a previously split file.

Chilkat Unicode C Downloads

Unicode C
#include <C_CkFileAccessW.h>

void ChilkatSample(void)
    {
    BOOL success;
    HCkFileAccessW fac;
    const wchar_t *reassembledFilename;
    const wchar_t *partPrefix;
    const wchar_t *partExtension;
    const wchar_t *srcDirPath;

    success = FALSE;

    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);

    }