src/modules/file.js
File
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class File extends EventEmitter {
/**
* File name without extension.
* @type {string}
*/
Function save
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
save(defaultPath) {
if (!fs.existsSync(this.path)) {
throw new Warning(
'The photo no longer exists.',
'Could not save the photo because it has been deleted, this could be caused due to cleaning or antivirus programs.',