Server IP : 162.0.209.157 / Your IP : 3.21.247.221 [ Web Server : LiteSpeed System : Linux premium178.web-hosting.com 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : balaoqob ( 2395) PHP Version : 8.0.30 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/node_modules/npm/node_modules/cacache/lib/util/ |
Upload File : |
'use strict' const BB = require('bluebird') const figgyPudding = require('figgy-pudding') const fixOwner = require('./fix-owner') const path = require('path') const rimraf = BB.promisify(require('rimraf')) const uniqueFilename = require('unique-filename') const TmpOpts = figgyPudding({ tmpPrefix: {} }) module.exports.mkdir = mktmpdir function mktmpdir (cache, opts) { opts = TmpOpts(opts) const tmpTarget = uniqueFilename(path.join(cache, 'tmp'), opts.tmpPrefix) return fixOwner.mkdirfix(cache, tmpTarget).then(() => { return tmpTarget }) } module.exports.withTmp = withTmp function withTmp (cache, opts, cb) { if (!cb) { cb = opts opts = null } opts = TmpOpts(opts) return BB.using(mktmpdir(cache, opts).disposer(rimraf), cb) } module.exports.fix = fixtmpdir function fixtmpdir (cache) { return fixOwner(cache, path.join(cache, 'tmp')) }