GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: clarify mkdir() recursive behavior by Stevepurpose · Pull Request #48109 · nodejs/node

Conversation

@Stevepurpose

@Stevepurpose Stevepurpose commented May 22, 2023

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Stevepurpose

Stevepurpose commented May 22, 2023

Copy link
Copy Markdown
Contributor Author

I had to add some more practical explanation to a few lines and also noticed a piece of code wasn't working the way it was described as ,noticed code only worked with a relative path and also commented the code after adding a relative path.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott
Trott reviewed May 22, 2023
View reviewed changes
Comment thread doc/api/fs.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott added the commit-queue-squash PRs the Commit Queue should land as one squashed commit. label May 22, 2023
Trott
Trott reviewed May 22, 2023
View reviewed changes
Comment thread doc/api/fs.md Outdated
Comment on lines 3214 to 3216

@Trott Trott May 22, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//Note the relative path to `tmp` below ,otherwise path won't be created in our project.
mkdir('./tmp/a/apple', { recursive: true }, (err) => {
// Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist.
mkdir('./tmp/a/apple', { recursive: true }, (err) => {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Trott Trott May 22, 2023

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The code should work fine with an absolute path instead of a relative path, but there are security implications to creating directories in /tmp with predictable names that aren't accounted for in the example code. It shouldn't ignore if someone else has already created the directory with permissions different than expected or with pre-existing contents. So I think it's good to switch it to a relative directory like you've done here or else some other absolute directory.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Stevepurpose Stevepurpose May 23, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I have a better explanation to the whole behaviour of the code above ,can I go ahead and fix it?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Trott
Trott reviewed May 22, 2023
View reviewed changes
Comment thread doc/api/fs.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Trott
Trott reviewed May 22, 2023
View reviewed changes
Comment thread doc/api/fs.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Stevepurpose @Trott
doc: clarify mkdir() recursive behavior
7647954
@Trott
Trott force-pushed the nodeSource branch from 75d612c to 7647954 Compare May 22, 2023 05:19
@Trott Trott changed the title Node source doc: clarify mkdir() recursive behavior May 22, 2023
@marco-ippolito marco-ippolito added the doc Issues and PRs related to Node.js documentation. label May 22, 2023
Stevepurpose and others added 4 commits May 22, 2023 15:40
@Stevepurpose @Trott
Update doc/api/fs.md
65a190e
Co-authored-by: Rich Trott <[email protected]>
@Stevepurpose @Trott
Update doc/api/fs.md
341eb8c
Co-authored-by: Rich Trott <[email protected]>
@Trott
Update doc/api/fs.md
2ca2074
@Trott
Update doc/api/fs.md
1a3c70a
Trott
Trott approved these changes May 22, 2023
View reviewed changes
@Trott Trott closed this May 22, 2023
@Trott Trott reopened this May 22, 2023
Trott
Trott reviewed May 22, 2023
View reviewed changes
Comment thread doc/api/fs.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Trott
Update doc/api/fs.md
040f6df
lpinca
lpinca approved these changes May 23, 2023
View reviewed changes
aymen94
aymen94 approved these changes May 24, 2023
View reviewed changes
@Trott Trott added the commit-queue PRs queued for automated landing through the Commit Queue. label May 24, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 24, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 6599cfe into nodejs:main May 24, 2023
@nodejs-github-bot

nodejs-github-bot commented May 24, 2023

Copy link
Copy Markdown
Collaborator

Landed in 6599cfe

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request May 30, 2023
@Stevepurpose @targos
doc: clarify mkdir() recursive behavior
bd311b6
PR-URL: #48109
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@targos targos mentioned this pull request Jun 4, 2023
v20.3.0 release proposal #48332
Merged
@Mesteery Mesteery mentioned this pull request Jun 7, 2023
Node source #48357
Closed
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
@Stevepurpose @danielleadams
doc: clarify mkdir() recursive behavior
43c9328
PR-URL: #48109
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
@Stevepurpose @MoLow
doc: clarify mkdir() recursive behavior
e9d4baf
PR-URL: nodejs#48109
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@danielleadams danielleadams mentioned this pull request Jul 10, 2023
v18.17.0 release proposal #48694
Merged
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@Stevepurpose @Ceres6
doc: clarify mkdir() recursive behavior
ba962bd
PR-URL: nodejs#48109
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
@Stevepurpose @Ceres6
doc: clarify mkdir() recursive behavior
0382f31
PR-URL: nodejs#48109
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Trott Trott Trott approved these changes
@lpinca lpinca lpinca approved these changes
+1 more reviewer
@aymen94 aymen94 aymen94 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

commit-queue-squash PRs the Commit Queue should land as one squashed commit. doc Issues and PRs related to Node.js documentation.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@Stevepurpose @nodejs-github-bot @Trott @lpinca @aymen94 @marco-ippolito
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.