✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.224
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/alt-nodejs18/root/usr/lib/node_modules/npm/node_modules.bundled/tar/lib//list.js
'use strict'

// XXX: This shares a lot in common with extract.js
// maybe some DRY opportunity here?

// tar -t
const hlo = require('./high-level-opt.js')
const Parser = require('./parse.js')
const fs = require('fs')
const fsm = require('fs-minipass')
const path = require('path')
const stripSlash = require('./strip-trailing-slashes.js')

module.exports = (opt_, files, cb) => {
  if (typeof opt_ === 'function') {
    cb = opt_, files = null, opt_ = {}
  } else if (Array.isArray(opt_)) {
    files = opt_, opt_ = {}
  }

  if (typeof files === 'function') {
    cb = files, files = null
  }

  if (!files) {
    files = []
  } else {
    files = Array.from(files)
  }

  const opt = hlo(opt_)

  if (opt.sync && typeof cb === 'function') {
    throw new TypeError('callback not supported for sync tar functions')
  }

  if (!opt.file && typeof cb === 'function') {
    throw new TypeError('callback only supported with file option')
  }

  if (files.length) {
    filesFilter(opt, files)
  }

  if (!opt.noResume) {
    onentryFunction(opt)
  }

  return opt.file && opt.sync ? listFileSync(opt)
    : opt.file ? listFile(opt, cb)
    : list(opt)
}

const onentryFunction = opt => {
  const onentry = opt.onentry
  opt.onentry = onentry ? e => {
    onentry(e)
    e.resume()
  } : e => e.resume()
}

// construct a filter that limits the file entries listed
// include child entries if a dir is included
const filesFilter = (opt, files) => {
  const map = new Map(files.map(f => [stripSlash(f), true]))
  const filter = opt.filter

  const mapHas = (file, r) => {
    const root = r || path.parse(file).root || '.'
    const ret = file === root ? false
      : map.has(file) ? map.get(file)
      : mapHas(path.dirname(file), root)

    map.set(file, ret)
    return ret
  }

  opt.filter = filter
    ? (file, entry) => filter(file, entry) && mapHas(stripSlash(file))
    : file => mapHas(stripSlash(file))
}

const listFileSync = opt => {
  const p = list(opt)
  const file = opt.file
  let threw = true
  let fd
  try {
    const stat = fs.statSync(file)
    const readSize = opt.maxReadSize || 16 * 1024 * 1024
    if (stat.size < readSize) {
      p.end(fs.readFileSync(file))
    } else {
      let pos = 0
      const buf = Buffer.allocUnsafe(readSize)
      fd = fs.openSync(file, 'r')
      while (pos < stat.size) {
        const bytesRead = fs.readSync(fd, buf, 0, readSize, pos)
        pos += bytesRead
        p.write(buf.slice(0, bytesRead))
      }
      p.end()
    }
    threw = false
  } finally {
    if (threw && fd) {
      try {
        fs.closeSync(fd)
      } catch (er) {}
    }
  }
}

const listFile = (opt, cb) => {
  const parse = new Parser(opt)
  const readSize = opt.maxReadSize || 16 * 1024 * 1024

  const file = opt.file
  const p = new Promise((resolve, reject) => {
    parse.on('error', reject)
    parse.on('end', resolve)

    fs.stat(file, (er, stat) => {
      if (er) {
        reject(er)
      } else {
        const stream = new fsm.ReadStream(file, {
          readSize: readSize,
          size: stat.size,
        })
        stream.on('error', reject)
        stream.pipe(parse)
      }
    })
  })
  return cb ? p.then(cb, cb) : p
}

const list = opt => new Parser(opt)


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
1 Jan 1970 12.00 AM
root / root
0
create.js
2.339 KB
9 Mar 2026 9.08 AM
root / root
0644
extract.js
2.785 KB
9 Mar 2026 9.08 AM
root / root
0644
get-write-flag.js
0.899 KB
9 Mar 2026 9.08 AM
root / root
0644
header.js
8.939 KB
9 Mar 2026 9.08 AM
root / root
0644
high-level-opt.js
0.742 KB
9 Mar 2026 9.08 AM
root / root
0644
large-numbers.js
2.177 KB
9 Mar 2026 9.08 AM
root / root
0644
list.js
3.148 KB
9 Mar 2026 9.08 AM
root / root
0644
mkdir.js
5.356 KB
9 Mar 2026 9.08 AM
root / root
0644
mode-fix.js
0.634 KB
9 Mar 2026 9.08 AM
root / root
0644
normalize-unicode.js
0.402 KB
9 Mar 2026 9.08 AM
root / root
0644
normalize-windows-path.js
0.4 KB
9 Mar 2026 9.08 AM
root / root
0644
pack.js
9.786 KB
9 Mar 2026 9.08 AM
root / root
0644
parse.js
15.939 KB
9 Mar 2026 9.08 AM
root / root
0644
path-reservations.js
4.307 KB
9 Mar 2026 9.08 AM
root / root
0644
pax.js
3.973 KB
9 Mar 2026 9.08 AM
root / root
0644
read-entry.js
2.775 KB
9 Mar 2026 9.08 AM
root / root
0644
replace.js
5.641 KB
9 Mar 2026 9.08 AM
root / root
0644
strip-absolute-path.js
0.896 KB
9 Mar 2026 9.08 AM
root / root
0644
strip-trailing-slashes.js
0.385 KB
9 Mar 2026 9.08 AM
root / root
0644
types.js
1.07 KB
9 Mar 2026 9.08 AM
root / root
0644
unpack.js
25.229 KB
9 Mar 2026 9.08 AM
root / root
0644
update.js
0.915 KB
9 Mar 2026 9.08 AM
root / root
0644
warn-mixin.js
0.708 KB
9 Mar 2026 9.08 AM
root / root
0644
winchars.js
0.522 KB
9 Mar 2026 9.08 AM
root / root
0644
write-entry.js
14.941 KB
9 Mar 2026 9.08 AM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF