UNPKG
patch-asar
Version:
latest (0.6.4)
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.5
0.5.4
0.5.2
0.5.1
Patch .asar archives
github.com/L1lith/patch-asar
L1lith/patch-asar
patch-asar
/
source
/
functions
/
rimraf.js
14 lines
(12 loc)
•
284 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
{ rm }
from
"fs/promises"
;
export
default
async
function
rimraf
(
path
) {
try
{
await
rm
(path, {
recursive
:
true
}); }
catch
(err) {
if
(err.
code
===
"ENOENT"
) {
// The directory doesn't exist, do nothing
}
else
{
throw
err; } } }