tmpdir

Return the directory for storing temporary files.

Usage

var tmpdir = require( '@stdlib/os/tmpdir' );

tmpdir()

Returns the directory for storing temporary files.

var dir = tmpdir();
// e.g., returns '/path/to/temporary/files/directory'

Examples

var PATH_SEP = require( '@stdlib/constants/path/sep' );
var tmpdir = require( '@stdlib/os/tmpdir' );

var parts = tmpdir().split( PATH_SEP );
console.log( parts );

CLI

Usage

Usage: tmpdir [options]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ tmpdir
/path/to/temporary/files/directory
Did you find this page helpful?