| 1935 | } |
| 1936 | |
| 1937 | async function chown(path, uid, gid) { |
| 1938 | const h = vfsState.handlers; |
| 1939 | if (h !== null) { |
| 1940 | const promise = h.chown(path, uid, gid); |
| 1941 | if (promise !== undefined) { await promise; return; } |
| 1942 | } |
| 1943 | |
| 1944 | path = getValidatedPath(path); |
| 1945 | validateInteger(uid, 'uid', -1, kMaxUserId); |
| 1946 | validateInteger(gid, 'gid', -1, kMaxUserId); |
| 1947 | return await PromisePrototypeThen( |
| 1948 | binding.chown(path, uid, gid, kUsePromises), |
| 1949 | undefined, |
| 1950 | handleErrorFromBinding, |
| 1951 | ); |
| 1952 | } |
| 1953 | |
| 1954 | async function utimes(path, atime, mtime) { |
| 1955 | path = getValidatedPath(path); |