let final = fs.createWriteStream(this.final_file, {flags: 'a', encoding: null});
final.on('open',async () => {
let x = 0;
for (const part of this.parts) {
console.log(part.file.path);
await new Promise((resolve,reject)=>{
const r = fs.createReadStream(part.file.path);
//r.on('close', resolve);
r.on('error', (err)=>{console.log(err)});
r.pipe(final,()=>{
console.log("done?");
resolve();
});
});
console.log(++x + " done");