Skip to content

glynnbird/tmpdir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmpdir

Creates and deletes temporary directories.

Installation

npm install --save 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()

About

Temporary directory creator and destroyer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published