lib/os/temporary-files.js
function createTempFile(options) {
  options = _.opts(options, {cleanup: true});
  return _createTemporaryPath((f) => fs.writeFileSync(f, ''), options.cleanup);
}
function createTempFile(options) {
  options = _.opts(options, {cleanup: true});
  return _createTemporaryPath((f) => fs.writeFileSync(f, ''), options.cleanup);
}
function createTempFile ( options ) { options = _ . opts ( options , { cleanup : true } ) ; return _createTemporaryPath ( ( f ) => fs . writeFileSync ( f , '' ) , options . cleanup ) ; }
Create temporary file
@function $os~createTempFile
@param {Object} [options]
@param {boolean} [options.cleanup=true] - Mark the file to be cleaned up on exit
@returns {string} - Temporary file created
@example
// Create a temporary file that will be deleted at exit
$os.createTempFile();
// => '/tmp/1453824062535.702'
@example
// Create a temporary file but do not automatically clean it up at exit
$os.createTempFile({cleanup: false});
// => '/tmp/1453461306625.4946'
Create temporary file