| 1905 | } |
| 1906 | |
| 1907 | async 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 | |
| 1924 | async function fchown(handle, uid, gid) { |
| 1925 | validateInteger(uid, 'uid', -1, kMaxUserId); |