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

Function lchown

lib/internal/fs/promises.js:1907–1922  ·  view source on GitHub ↗
(path, uid, gid)

Source from the content-addressed store, hash-verified

1905}
1906
1907async function lchown(path, uid, gid) {
1908 const h = vfsState.handlers;
1909 if (h !== null) {
1910 const promise = h.lchown(path, uid, gid);
1911 if (promise !== undefined) { await promise; return; }
1912 }
1913
1914 path = getValidatedPath(path);
1915 validateInteger(uid, 'uid', -1, kMaxUserId);
1916 validateInteger(gid, 'gid', -1, kMaxUserId);
1917 return await PromisePrototypeThen(
1918 binding.lchown(path, uid, gid, kUsePromises),
1919 undefined,
1920 handleErrorFromBinding,
1921 );
1922}
1923
1924async function fchown(handle, uid, gid) {
1925 validateInteger(uid, 'uid', -1, kMaxUserId);

Callers

nothing calls this directly

Calls 1

lchownMethod · 0.80

Tested by

no test coverage detected