* Sets the owner of the symbolic link. * @param {string | Buffer | URL} path * @param {number} uid * @param {number} gid * @param {(err?: Error) => any} callback * @returns {void}
(path, uid, gid, callback)
| 2475 | * @returns {void} |
| 2476 | */ |
| 2477 | function lchown(path, uid, gid, callback) { |
| 2478 | callback = makeCallback(callback); |
| 2479 | path = getValidatedPath(path); |
| 2480 | validateInteger(uid, 'uid', -1, kMaxUserId); |
| 2481 | validateInteger(gid, 'gid', -1, kMaxUserId); |
| 2482 | |
| 2483 | const h = vfsState.handlers; |
| 2484 | if (h !== null && vfsVoid(h.lchown(path, uid, gid), callback)) return; |
| 2485 | |
| 2486 | const req = new FSReqCallback(); |
| 2487 | req.oncomplete = callback; |
| 2488 | binding.lchown(path, uid, gid, req); |
| 2489 | } |
| 2490 | |
| 2491 | /** |
| 2492 | * Synchronously sets the owner of the symbolic link. |
nothing calls this directly
no test coverage detected
searching dependent graphs…