mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
15 lines
331 B
JavaScript
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,
|
|
};
|