MCPcopy Index your code
hub / github.com/nodejs/node / chownSync

Function chownSync

lib/fs.js:2593–2605  ·  view source on GitHub ↗

* Synchronously changes the owner and group * of a file. * @param {string | Buffer | URL} path * @param {number} uid * @param {number} gid * @returns {void}

(path, uid, gid)

Source from the content-addressed store, hash-verified

2591 * @returns {void}
2592 */
2593function chownSync(path, uid, gid) {
2594 path = getValidatedPath(path);
2595 validateInteger(uid, 'uid', -1, kMaxUserId);
2596 validateInteger(gid, 'gid', -1, kMaxUserId);
2597
2598 const h = vfsState.handlers;
2599 if (h !== null) {
2600 const result = h.chownSync(path, uid, gid);
2601 if (result !== undefined) return;
2602 }
2603
2604 binding.chown(path, uid, gid);
2605}
2606
2607/**
2608 * Changes the file system timestamps of the object

Callers

nothing calls this directly

Calls 2

chownSyncMethod · 0.45
chownMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…