DEP0147: fs.rmdir(path, { recursive: true })


类型:运行时

【Type: Runtime】

在未来版本的 Node.js 中,fs.rmdirfs.rmdirSyncfs.promises.rmdirrecursive 选项将被忽略。

【In future versions of Node.js, recursive option will be ignored for fs.rmdir, fs.rmdirSync, and fs.promises.rmdir.】

请使用 fs.rm(path, { recursive: true, force: true })fs.rmSync(path, { recursive: true, force: true })fs.promises.rm(path, { recursive: true, force: true })

【Use fs.rm(path, { recursive: true, force: true }), fs.rmSync(path, { recursive: true, force: true }) or fs.promises.rm(path, { recursive: true, force: true }) instead.】