Sample code for 30+ languages & platforms
React Native

Reassemble a Previously Split File

Demonstrates how to reassemble a previously split file.

Chilkat React Native Downloads

React Native
import { FileAccess } from '@chilkat/react-native'

function chilkatExample() {
  const fac = new FileAccess();

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

  const partPrefix = 'hamlet';
  const partExtension = 'spl';
  const srcDirPath = '.';

  // Reassembles the original file from hamlet1.spl, hamlet2.spl, ...

  try {
    fac.reassembleFile(srcDirPath, partPrefix, partExtension, reassembledFilename);
    console.log('Success.');
  } catch {
    console.log(fac.lastErrorText);
  }
}