1.0.0 • Published 3 years ago

choirlesstmpdir v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

tmpdir

Creates and deletes temporary directories.

Installation

npm install https://github.com/glynnbird/tmpdir

Usage

const tmpdir = require('tmpdir')
const path = require('path')
const fs = require('fs')

// make temporary directory
const tempPath = tmpdir.createTmpDirectory()

// write some temporary files
const p = path.join(tempPath, 'myfile.txt')
fs.writeFileSync(p, 'Hello World')

// tidy up
tmpdir.removeTmpDirectory()