Package Exports
- create-file
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
create-file
Write to a file only if it does not exist
Installation
Install create-file using npm:
npm install --save create-fileUsage
Module usage
var createFile = require('create-file');
createFile('/path/to/file/to-create', 'my content\n', function (err) {
// file either already exists or is now created (including non existing directories)
});API
createFile(filename, contents, cb)
| Name | Type | Description |
|---|---|---|
| filename | String |
The filename to create |
| contents | String |
The content to write |
| cb | Function |
Callback |
License
MIT