file-chopper
chopper split and merge files in multiple parts.
Installation
To Install Globally
npm i -g file-chopper --save
To Install Locally
npm i file-chopper --save
Up To Date
All methods support latest Promise feature of ECMAScript Using BlueBird Promise Library.
Split files with input parts
file-chopper(file) => Promise<string[]>
string[] is an array containing names of all partition files.
Input:
- file: Path to the file to split.
- Int: No of files to create from original file
Returns:
- Promise<string[]>: Promise with string[] array containing full paths of all created files.
Example:
const file-chopper = ; file-chopper ;
Merge parts
mergeFiles(names, outputFile) => Promise<>
Inputs:
- names: String[] array with full part paths.
- outputFile: Full path of the output file to be created.
Returns:
- Promise<>: Promise that results in an empty resolving.
Example:
const file-chopper = ; file-chopper ;