(path, mode)
| 1874 | } |
| 1875 | |
| 1876 | async function chmod(path, mode) { |
| 1877 | path = getValidatedPath(path); |
| 1878 | mode = parseFileMode(mode, 'mode'); |
| 1879 | |
| 1880 | const h = vfsState.handlers; |
| 1881 | if (h !== null) { |
| 1882 | const promise = h.chmod(path, mode); |
| 1883 | if (promise !== undefined) { await promise; return; } |
| 1884 | } |
| 1885 | |
| 1886 | return await PromisePrototypeThen( |
| 1887 | binding.chmod(path, mode, kUsePromises), |
| 1888 | undefined, |
| 1889 | handleErrorFromBinding, |
| 1890 | ); |
| 1891 | } |
| 1892 | |
| 1893 | async function lchmod(path, mode) { |
| 1894 | const h = vfsState.handlers; |
no test coverage detected