Node fs.rmdir function | API Reference | Bun
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
rmdirNrmdir
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
node:fs/
rmdirNrmdir
namespace
fs.rmdirfunction
rmdir(path:
PathLike,callback:
NoParamCallback): void;
Asynchronous rmdir(2). No arguments other than a possible exception are given to the completion callback.
Using fs.rmdir() on a file (not a directory) results in an ENOENT error on Windows and an ENOTDIR error on POSIX.
To get a behavior similar to the rm -rf Unix command, use rm with options { recursive: true, force: true }.
namespace
rmdirResources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →