tempfile

WebJar for tempfile

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

tempfile
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

tempfile
WebJar for tempfile
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/tempfile

Download tempfile

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/tempfile/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>tempfile</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/tempfile/
implementation 'org.webjars.npm:tempfile:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/tempfile/
implementation ("org.webjars.npm:tempfile:2.0.0")
'org.webjars.npm:tempfile:jar:2.0.0'
<dependency org="org.webjars.npm" name="tempfile" rev="2.0.0">
  <artifact name="tempfile" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='tempfile', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "tempfile" % "2.0.0"
[org.webjars.npm/tempfile "2.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : temp-dir jar [1.0.0,2)
org.webjars.npm : uuid jar [3.0.1,4)

Project Modules

There are no modules declared in this project.

tempfile

Get a random temporary file path

Checkout out tempy which is a better take on this module.

Install

$ npm install tempfile

Usage

const tempfile = require('tempfile');

tempfile('.png');
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/4049f192-43e7-43b2-98d9-094e6760861b.png'

tempfile();
//=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T/6271e235-13b9-4138-8b9b-ee2f26c09ce3'

API

tempfile([extension])

extension

Type: string

Extension to append to the path.

Related

  • tempy - Get a random temporary file or directory path
  • temp-write - Write string/buffer/stream to a random temp file

License

MIT © Sindre Sorhus

Versions

Version
2.0.0