deployphp/node_modules/fs-extra/lib/remove/index.js

18 lines
331 B
JavaScript
Raw Permalink Normal View History

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