REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.59 KB
Close
/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js
Text
Base64
'use strict' const path = require('path') const tar = require('tar') module.exports = extractStream module.exports._computeMode = computeMode function computeMode (fileMode, optMode, umask) { return (fileMode | optMode) & ~(umask || 0) } function extractStream (dest, opts) { opts = opts || {} const sawIgnores = new Set() return tar.x({ cwd: dest, filter: (name, entry) => !entry.header.type.match(/^.*link$/i), strip: 1, onwarn: msg => opts.log && opts.log.warn('tar', msg), uid: opts.uid, gid: opts.gid, onentry (entry) { if (entry.type.toLowerCase() === 'file') { entry.mode = computeMode(entry.mode, opts.fmode, opts.umask) } else if (entry.type.toLowerCase() === 'directory') { entry.mode = computeMode(entry.mode, opts.dmode, opts.umask) } else { entry.mode = computeMode(entry.mode, 0, opts.umask) } // Note: This mirrors logic in the fs read operations that are // employed during tarball creation, in the fstream-npm module. // It is duplicated here to handle tarballs that are created // using other means, such as system tar or git archive. if (entry.type.toLowerCase() === 'file') { const base = path.basename(entry.path) if (base === '.npmignore') { sawIgnores.add(entry.path) } else if (base === '.gitignore') { const npmignore = entry.path.replace(/\.gitignore$/, '.npmignore') if (!sawIgnores.has(npmignore)) { // Rename, may be clobbered later. entry.path = npmignore } } } } }) }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
fetchers
DIR
-
drwxr-xr-x
2024-03-03 22:42:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
util
DIR
-
drwxr-xr-x
2024-03-03 22:42:04
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
extract-stream.js
1.59 KB
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fetch.js
1.85 KB
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
finalize-manifest.js
8.06 KB
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).