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

Function lchownSync

lib/fs.js:2498–2510  ·  view source on GitHub ↗

* Synchronously sets the owner of the symbolic link. * @param {string | Buffer | URL} path * @param {number} uid * @param {number} gid * @returns {void}

(path, uid, gid)

Source from the content-addressed store, hash-verified

2496 * @returns {void}
2497 */
2498function lchownSync(path, uid, gid) {
2499 path = getValidatedPath(path);
2500 validateInteger(uid, 'uid', -1, kMaxUserId);
2501 validateInteger(gid, 'gid', -1, kMaxUserId);
2502
2503 const h = vfsState.handlers;
2504 if (h !== null) {
2505 const result = h.lchownSync(path, uid, gid);
2506 if (result !== undefined) return;
2507 }
2508
2509 binding.lchown(path, uid, gid);
2510}
2511
2512/**
2513 * Sets the owner of the file.

Callers

nothing calls this directly

Calls 1

lchownMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…