mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 15:35:41 +00:00

Move tmpdir functionality to its own module (common/tmpdir). PR-URL: https://github.com/nodejs/node/pull/17856 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
14 lines
261 B
JavaScript
14 lines
261 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const tmpdir = require('../common/tmpdir');
|
|
tmpdir.refresh();
|
|
|
|
const s = fs.createWriteStream(path.join(tmpdir.path, 'nocallback'));
|
|
|
|
s.end('hello world');
|
|
s.close();
|