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


类型: 运行时

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

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

Type: Runtime

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

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.