Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show support for mode #587

Merged
merged 1 commit into from Aug 11, 2018
Merged

Conversation

@robertjacobson
Copy link
Contributor

@robertjacobson robertjacobson commented May 30, 2018

Node fs's mkdir (https://nodejs.org/api/fs.html#fs_fs_mkdir_path_mode_callback) supports mode specification. After reviewing the source
fs-extra does as well, but is not documented. Update the documentation
to include the options parameter and provide a few examples of using
mode.

@robertjacobson robertjacobson force-pushed the mkdirs-doc-mode branch 2 times, most recently from 69af26f to 5a63e26 May 30, 2018
@coveralls
Copy link

@coveralls coveralls commented May 30, 2018

Coverage Status

Coverage remained the same at 86.826% when pulling 0957688 on robertjacobson:mkdirs-doc-mode into 5b29ae3 on jprichardson:master.

Loading

Copy link
Collaborator

@JPeer264 JPeer264 left a comment

Oh ya, that was missing in the docs. Thanks 👍

Loading

@RyanZim RyanZim requested review from jprichardson and manidlou May 31, 2018
// With a callback:
fs.ensureDir(dir, err => {
console.log(err) // => null
// dir has now been created, including the directory it is to be placed in
})
// With a callback and a mode integer
fs.ensureDir(dir, desireMode, err => {
Copy link
Collaborator

@manidlou manidlou Jun 1, 2018

Choose a reason for hiding this comment

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

@robertjacobson should be desiredMode.

Loading

Copy link
Contributor Author

@robertjacobson robertjacobson Jun 1, 2018

Choose a reason for hiding this comment

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

Ah, good catch @manidlou. Fixed.

Loading

Node fs's mkdir supports mode specification. After reviewing the source
fs-extra does as well, but is not documented. Update the documentation
to include the `options` parameter and provide a few examples of using
`mode`.
@manidlou
Copy link
Collaborator

@manidlou manidlou commented Aug 11, 2018

@jprichardson do you have any concerns about this? If not, we can merge it then.

Loading

@jprichardson jprichardson merged commit 402c1d0 into jprichardson:master Aug 11, 2018
3 checks passed
Loading
@RyanZim RyanZim added this to the 8.0.0 milestone Aug 11, 2018
malept added a commit to electron-userland/electron-installer-debian that referenced this issue Oct 4, 2018
facebook-github-bot added a commit to facebook/flipper that referenced this issue Nov 14, 2018
Summary:
Changes are mostly bug fixes, that shouldn't affect us. From the change log:

7.0.1 / 2018-11-07
------------------

- Fix `removeSync()` on Windows, in some cases, it would error out with `ENOTEMPTY` ([#646](jprichardson/node-fs-extra#646))
- Document `mode` option for `ensureDir*()` ([#587](jprichardson/node-fs-extra#587))
- Don't include documentation files in npm package tarball ([#642](jprichardson/node-fs-extra#642), [#643](jprichardson/node-fs-extra#643))

7.0.0 / 2018-07-16
------------------

- **BREAKING:** Refine `copy*()` handling of symlinks to properly detect symlinks that point to the same file. ([#582](jprichardson/node-fs-extra#582))
- Fix bug with copying write-protected directories ([#600](jprichardson/node-fs-extra#600))
- Universalify `fs.lchmod()` ([#596](jprichardson/node-fs-extra#596))
- Add `engines` field to `package.json` ([#580](jprichardson/node-fs-extra#580))

6.0.1 / 2018-05-09
------------------

- Fix `fs.promises` `ExperimentalWarning` on Node v10.1.0 ([#578](jprichardson/node-fs-extra#578))

6.0.0 / 2018-05-01
------------------

- Drop support for Node.js versions 4, 5, & 7 ([#564](jprichardson/node-fs-extra#564))
- Rewrite `move` to use `fs.rename` where possible ([#549](jprichardson/node-fs-extra#549))
- Don't convert relative paths to absolute paths for `filter` ([#554](jprichardson/node-fs-extra#554))
- `copy*`'s behavior when `preserveTimestamps` is `false` has been OS-dependent since 5.0.0, but that's now explicitly noted in the docs ([#563](jprichardson/node-fs-extra#563))
- Fix subdirectory detection for `copy*` & `move*` ([#541](jprichardson/node-fs-extra#541))
- Handle case-insensitive paths correctly in `copy*` ([#568](jprichardson/node-fs-extra#568))

Reviewed By: jknoxville

Differential Revision: D13023753

fbshipit-source-id: 1ecc6f40be4c8146f92dd29ede846b5ab56765ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants