Temp File
Path:
/src/method/tempfile.coffeecompiled to/lib/method/tempfile.js
This will create a new temporary file for you. Like in tempdir()
you may give a specific path and prefix before the numeral file part.
Examples
You may get a file back without doing anything:
CoffeeScript Code fs = require 'alinex-fs'
fs.tempfile (err, dir) ->
  console.log "Temporary file is: " + dirBut don’t forget to remove it if no longer needed.
tempfile()
Usage:
tempfile(base, [prefix=process, cb)
- Parameter
- 
- base-- Stringpath under which the directory should be created (use- nullto make it in the os default directory)
- [prefix=process-- Stringtitle] to use before numerical part
- cb-- function(<Error>, <String>)callback with- Erroror the path to the newly created file
 
tempfileSync()
Usage:
tempfileSync({base=os, [prefix=process)
- Parameter
- 
- {base=os-- Stringsettings} path under which the directory should be created
- [prefix=process-- Stringtitle] to use before numerical part
 
- Return
- Stringthe path to the newly created directory
- Throws
- 
- Errorif something went wrong