Sample code for 30+ languages & platforms
Node.js

Reassemble a Previously Split File

Demonstrates how to reassemble a previously split file.

Chilkat Node.js Downloads

Node.js
NODEJS_PRELUDE

function chilkatExample() {

    var success = false;

    var fac = new chilkat.FileAccess();

    //  Any type of file may be reassembled.  It doesn't matter if it's
    //  a binary file or a text file.
    var reassembledFilename = "hamlet2.xml";

    var partPrefix = "hamlet";
    var partExtension = "spl";
    var srcDirPath = ".";

    //  Reassembles the original file from hamlet1.spl, hamlet2.spl, ...
    success = fac.ReassembleFile(srcDirPath,partPrefix,partExtension,reassembledFilename);

    if (success == true) {
        console.log("Success.");
    }
    else {
        console.log(fac.LastErrorText);
    }


}

chilkatExample();