18 lines
331 B
JavaScript
Raw Normal View History

2023-01-10 16:49:41 +01:00
'use strict'
const fs = require('graceful-fs')
const u = require('universalify').fromCallback
function remove (path, callback) {
2023-03-28 17:15:22 +02:00
fs.rm(path, { recursive: true, force: true }, callback)
2023-01-10 16:49:41 +01:00
}
function removeSync (path) {
2023-03-28 17:15:22 +02:00
fs.rmSync(path, { recursive: true, force: true })
2023-01-10 16:49:41 +01:00
}
module.exports = {
remove: u(remove),
removeSync
}