Skip to content

Commit

Permalink
add new removeFolderF
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile committed Jul 9, 2024
1 parent 923d2db commit 0da5f70
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/plugman/pluginHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ const handlers = {
}

removeFile(project.www, target);
removeFileF(path.resolve(project.www, 'plugins', plugin.id));
removeFolderF(path.resolve(project.www, 'plugins', plugin.id));
if (options && options.usePlatformWww) {
removeFile(project.platformWww, target);
removeFileF(path.resolve(project.platformWww, 'plugins', plugin.id));
removeFolderF(path.resolve(project.platformWww, 'plugins', plugin.id));
}
}
},
Expand Down Expand Up @@ -362,8 +362,13 @@ function removeFile (project_dir, src) {
fs.rmSync(file);
}

// deletes file/directory without checking
// deletes file without checking
function removeFileF (file) {
fs.rmSync(file);
}

// deletes directory without checking
function removeFolderF (file) {
fs.rmSync(file, { recursive: true, force: true });
}

Expand Down

0 comments on commit 0da5f70

Please sign in to comment.