Skip to content

fix(docs): clarify mkdir does not throw with recursive: true#33019

Open
kovan wants to merge 1 commit intodenoland:mainfrom
kovan:docs/mkdir-recursive-no-throw-v2
Open

fix(docs): clarify mkdir does not throw with recursive: true#33019
kovan wants to merge 1 commit intodenoland:mainfrom
kovan:docs/mkdir-recursive-no-throw-v2

Conversation

@kovan
Copy link
Copy Markdown

@kovan kovan commented Mar 26, 2026

The JSDoc for Deno.mkdir and Deno.mkdirSync said "Defaults to throwing error if the directory already exists" without mentioning that recursive: true suppresses this error.

The MkdirOptions.recursive property already documented this correctly, but the function-level docs were misleading. Changed to "Throws if the directory already exists, unless recursive is set to true."

Fixes #21768

The JSDoc for Deno.mkdir and Deno.mkdirSync said "Defaults to
throwing error if the directory already exists" without mentioning
that recursive: true suppresses this error. The MkdirOptions.recursive
property already documented this behavior, but the function-level docs
were misleading.

Fixes denoland#21768
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 26, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mkdir/mkdirSync does not throw an error when directory already exists and recursive: true

2 participants