2016-08-23 19:36:31 +02:00

15 lines
331 B
JavaScript

'use strict';
const os = require('os');
const path = require('path');
const crypto = require('crypto');
const getTmpDirPath = () => path.join(os.tmpdir(), crypto.randomBytes(8).toString('hex'));
const getTmpFilePath = (fileName) => path.join(getTmpDirPath(), fileName);
module.exports = {
getTmpDirPath,
getTmpFilePath,
};