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

Function lchmodSync

lib/fs.js:2418–2428  ·  view source on GitHub ↗

* Synchronously changes the permissions on a symbolic link. * @param {string | Buffer | URL} path * @param {number} mode * @returns {void}

(path, mode)

Source from the content-addressed store, hash-verified

2416 * @returns {void}
2417 */
2418function lchmodSync(path, mode) {
2419 const fd = fs.openSync(path, O_WRONLY | O_SYMLINK);
2420
2421 // Prefer to return the chmod error, if one occurs,
2422 // but still try to close, and report closing errors if they occur.
2423 try {
2424 fs.fchmodSync(fd, mode);
2425 } finally {
2426 fs.closeSync(fd);
2427 }
2428}
2429
2430/**
2431 * Asynchronously changes the permissions of a file.

Callers

nothing calls this directly

Calls 2

openSyncMethod · 0.45
closeSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…