@serverless-rewrite/serverless
Version:
Serverless Framework - Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more
18 lines (13 loc) • 364 B
JavaScript
;
const os = require('os');
const path = require('path');
const crypto = require('crypto');
const tmpDirCommonPath = path.join(
os.tmpdir(),
'tmpdirs-serverless',
crypto.randomBytes(2).toString('hex')
);
function getTmpDirPath() {
return path.join(tmpDirCommonPath, crypto.randomBytes(8).toString('hex'));
}
module.exports = getTmpDirPath;