-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
feature-request fs.fileWrite with option.mkdirpΒ #33559
Copy link
Copy link
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.stale
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.stale
Type
Fields
Give feedbackNo fields configured for issues without a type.
Is your feature request related to a problem? Please describe.
i am author of npm-package istanbul-lite.
when creating coverage-reports and artifacts,
its common to lazily write data to file-directories that have yet to be created.
Describe the solution you'd like
add extra boolean
<options>.mkdirpto functionsfs.writeFileandfs.writeFileSync,that will lazily create missing file-directories when writing to file.
the common-use-case are:
Describe alternatives you've considered
i currently use this helper-function in all my projects,
to lazily generate directories when writing artifacts and coverage-reports.