MCPcopy
hub / github.com/Kong/insomnia / chperm

Function chperm

packages/insomnia/bin/yarn-standalone.js:46039–46053  ·  view source on GitHub ↗
(name, header, cb)

Source from the content-addressed store, hash-verified

46037 }
46038
46039 var chperm = function (name, header, cb) {
46040 var link = header.type === 'symlink'
46041 var chmod = link ? xfs.lchmod : xfs.chmod
46042 var chown = link ? xfs.lchown : xfs.chown
46043
46044 if (!chmod) return cb()
46045
46046 var mode = (header.mode | (header.type === 'directory' ? dmode : fmode)) & umask
46047 chmod(name, mode, function (err) {
46048 if (err) return cb(err)
46049 if (!own) return cb()
46050 if (!chown) return cb()
46051 chown(name, header.uid, header.gid, cb)
46052 })
46053 }
46054
46055 extract.on('entry', function (header, stream, next) {
46056 header = map(header) || header

Callers 1

statFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected