Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 node.js 移动/删除/重命名繁忙的目录?
目前我正在使用fs-extra包来移动和替换目录。
fs-extra
fse.move(src, dest, { overwrite: true }, err => { if (err) return console.error(err) console.log('moved') })
src并且dest当然具有相同的文件夹名称,但是dest文件夹很忙,即使它很忙或被阻止,我也需要覆盖。
src
dest