📅  最后修改于: 2022-03-11 15:03:59.758000             🧑  作者: Mango
const fs = require('fs')
const path = './file.txt'
try {
fs.unlinkSync(path)
//file removed
} catch(err) {
console.error(err)
}