Temporary File Path
NodeJS
Easy
3 views
Problem Description
Create a temp file path in os.tmpdir and print it.
Output Format
Print path.
Constraints
Use Date.now for uniqueness.
Official Solution
const os = require('os');
const path = require('path');
const p = path.join(os.tmpdir(), 'meetcode-' + Date.now() + '.txt');
console.log(p);
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!