PHP 8.2.30
Preview: with-owner-sync.js Size: 463 B
/proc/self/root/opt/alt/alt-nodejs16/root/usr/lib/node_modules/npm/node_modules/@npmcli/fs/lib/with-owner-sync.js

const getOptions = require('./common/get-options.js')
const owner = require('./common/owner-sync.js')

const withOwnerSync = (path, fn, opts) => {
  const options = getOptions(opts, {
    copy: ['owner'],
  })

  const { uid, gid } = owner.validate(path, options.owner)

  const result = fn({ uid, gid })

  owner.update(path, uid, gid)
  if (typeof result === 'string') {
    owner.update(result, uid, gid)
  }

  return result
}

module.exports = withOwnerSync

Directory Contents

Dirs: 3 × Files: 10

Name Size Perms Modified Actions
common DIR
- drwxr-xr-x 2026-04-08 07:02:23
Edit Download
cp DIR
- drwxr-xr-x 2026-04-08 07:02:23
Edit Download
rm DIR
- drwxr-xr-x 2026-04-08 07:02:23
Edit Download
494 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
3.32 KB lrw-r--r-- 2026-03-17 06:55:04
Edit Download
660 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
395 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
435 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
777 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
463 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
495 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
1021 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download
395 B lrw-r--r-- 2026-03-17 06:55:04
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).