(path, mode, cb)
| 839 | }, |
| 840 | |
| 841 | chmod(path, mode, cb) { |
| 842 | if (!exists(path)) { |
| 843 | cb(ERRNO.ENOENT); |
| 844 | return; |
| 845 | } |
| 846 | const entry = files.get(path); |
| 847 | if (entry !== undefined) entry.mode = mode; |
| 848 | updateMeta(path, { mode }); |
| 849 | if (entry === undefined && directWriteVfs.chmodSync !== undefined) { |
| 850 | try { |
| 851 | directWriteVfs.chmodSync(toVfs(path), mode); |
| 852 | } catch (error) { |
| 853 | cb(toErrno(error)); |
| 854 | return; |
| 855 | } |
| 856 | } |
| 857 | cb(0); |
| 858 | }, |
| 859 | |
| 860 | chown(path, uid, gid, cb) { |
| 861 | if (!exists(path)) { |