2.0.0 • Published 7 years ago

create-temp-file2 v2.0.0

Weekly downloads
21
License
MIT
Repository
github
Last release
7 years ago

create-temp-file2

Last version Build Status Coverage Status Dependency status Dev Dependencies Status NPM Status Donate

Creates a temporal file and returns a write stream with path and cleanup methods.

Install

npm install create-temp-file2 --save

Usage

var createTempFile = require('create-temp-file2');
var temp = createTempFile({enoent: false}) // Prevent ENOENT error.

API

createTempFile(options)

The parameters providers are passed first to tempFile2.

options.enoent

Type: boolean Default: true

Emit stream error under ENOENT error. This error appear when you call .cleanup or .cleanupSync more than once.

.cleanup

Alias to fs.unlink handling errors as stream.

.cleanupSync

Sync version on .cleanup. Alias to fs.unlinkSync.

Related

  • tempfile2 – Get a random temp file path. much better.

License

MIT © Kiko Beats

2.0.0

7 years ago

1.1.1

7 years ago

1.1.0

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.2.3

8 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago