Sample code for 30+ languages & platforms
Rust

Reassemble a Previously Split File

Demonstrates how to reassemble a previously split file.

Chilkat Rust Downloads

Rust

let fac = chilkat::FileAccess::new();

// Any type of file may be reassembled.  It doesn't matter if it's
// a binary file or a text file.
let reassembled_filename = "hamlet2.xml".to_string();

let part_prefix = "hamlet".to_string();
let part_extension = "spl".to_string();
let src_dir_path = ".".to_string();

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

if fac.reassemble_file(&src_dir_path, &part_prefix, &part_extension, &reassembled_filename).is_ok() {
    println!("Success.");
} else {
    println!("{}", fac.last_error_text());
}