Skip to content
Write a file creating intermediate directories
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.eslintrc
.gitignore
README.md
index.js
package.json

README.md

write-file-promise

Write a file creating intermediate directories

Installation

npm install --save write-file-promise

Usage

const write = require('write-file-promise');

write('/tmp/create/file.log', data)
.then(() => {})
.catch(() => {})

The module creates intermediate directories tmp and create if they don't exist already.

write has the same signature of fs.writeFile except the last parameter callback.

You can’t perform that action at this time.