Package Exports
- tmpz
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 (tmpz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Tmpz

Copy a file or directory to OS temporary directory with a random name. Also you can remove it later.
Prerequisites
NodeJS v4.0 or greater.
Install
npm install tmpz --save-devUsage
const tmpz = require('tmpz')
try {
const dest = tmpz.copy('./my_directory')
console.log(dest)
// > /tmp/393a6d0851bb6c10214f92bbaa9c833d
// Removing the temp dir in 7 seconds
setTimeout(() => tmpz.remove(dest), 7000)
} catch (err) {
console.error(err)
}License
MIT license
© 2017 José Luis Quintana