Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async _startDeleting(record) {
let options = {
title: "Deletion in progress",
row1: "Deleting:",
progress1: "Total:"
}
this._progress = new Progress(options);
this._progress.onClose = () => this.abort();
super.run(); // schedule progress window
return this._delete(record);
}
async run() {
let scan = new Scan(this._sourcePath);
let root = await scan.run();
if (!root) { return false; }
this._stats.total = root.size;
let options = {
title: this._texts.title,
row1: this._texts.row1,
row2: "To:",
progress1: "File:",
progress2: "Total:"
}
this._progress = new Progress(options);
this._progress.update({progress1:0, progress2:0});
this._progress.onClose = () => this.abort();
super.run(); // schedule progress window
let result = await this._copy(root, this._targetPath);
this._end();
return result;
}
constructor(path) {
super();
this._path = path;
let options = {
title: "Directory scan in progress",
row1: "Scanning:",
progress1: ""
}
this._progress = new Progress(options);
this._progress.onClose = () => this.abort();
}