Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/ts.corals.io/frontend/node_modules/cacache/lib/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/ts.corals.io/frontend/node_modules/cacache/lib/util/tmp.js
'use strict'

const fs = require('@npmcli/fs')

const fixOwner = require('./fix-owner')
const path = require('path')

module.exports.mkdir = mktmpdir

function mktmpdir (cache, opts = {}) {
  const { tmpPrefix } = opts
  const tmpDir = path.join(cache, 'tmp')
  return fs.mkdir(tmpDir, { recursive: true, owner: 'inherit' })
    .then(() => {
      // do not use path.join(), it drops the trailing / if tmpPrefix is unset
      const target = `${tmpDir}${path.sep}${tmpPrefix || ''}`
      return fs.mkdtemp(target, { owner: 'inherit' })
    })
}

module.exports.withTmp = withTmp

function withTmp (cache, opts, cb) {
  if (!cb) {
    cb = opts
    opts = {}
  }
  return fs.withTempDir(path.join(cache, 'tmp'), cb, opts)
}

module.exports.fix = fixtmpdir

function fixtmpdir (cache) {
  return fixOwner(cache, path.join(cache, 'tmp'))
}

Spamworldpro Mini