(path, data, options)
| 2116 | } |
| 2117 | |
| 2118 | async function appendFile(path, data, options) { |
| 2119 | options = getOptions(options, { encoding: 'utf8', mode: 0o666, flag: 'a' }); |
| 2120 | parseFileMode(options.mode, 'mode', 0o666); |
| 2121 | |
| 2122 | const h = vfsState.handlers; |
| 2123 | if (h !== null) { |
| 2124 | checkAborted(options.signal); |
| 2125 | const promise = h.appendFile(path, data, options); |
| 2126 | if (promise !== undefined) { await promise; return; } |
| 2127 | } |
| 2128 | options = copyObject(options); |
| 2129 | options.flag ||= 'a'; |
| 2130 | return writeFile(path, data, options); |
| 2131 | } |
| 2132 | |
| 2133 | async function readFile(path, options) { |
| 2134 | const h = vfsState.handlers; |
nothing calls this directly
no test coverage detected
searching dependent graphs…