writeBuffer.js 222 B

12345678910111213
  1. 'use strict';
  2. var fs = require('graceful-fs');
  3. function writeBuffer(writePath, file, cb) {
  4. var opt = {
  5. mode: file.stat.mode
  6. };
  7. fs.writeFile(writePath, file.contents, opt, cb);
  8. }
  9. module.exports = writeBuffer;