fs-force-write-file-sync

1.0.3 • Public • Published

fs-force-write-file-sync

Requirements

  • Node >= 6.0.0

Usage

var mkfileSync = require('fs-force-mkfile-sync');
try {
    let info = mkfileSync('./a/b/c/d', 'Hello, World!!');
    console.log('Succeed');
} catch (error) {
    console.log('Failed', info);
}

The code above would:

  • First, do force-mkdir to create a directory './a/b/c'
  • Then, do fs.writeFileSync to create file './a/b/c/d' with content 'Hello, World!!'

License

MIT © Hoàng Văn Khải

Package Sidebar

Install

npm i fs-force-write-file-sync

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • khai96_