(path, options)
| 204 | return findVFSWith(pathStr, 'open', (vfs, n) => vfs.readFileSync(n, options)); |
| 205 | }, |
| 206 | readdirSync(path, options) { |
| 207 | const result = vfsRead(path, 'scandir', (vfs, n) => vfs.readdirSync(n, options)); |
| 208 | if (result !== undefined && options?.encoding === 'buffer' && !options?.withFileTypes) { |
| 209 | for (let i = 0; i < result.length; i++) { |
| 210 | if (typeof result[i] === 'string') result[i] = Buffer.from(result[i]); |
| 211 | } |
| 212 | } |
| 213 | return result; |
| 214 | }, |
| 215 | lstatSync(path, options) { |
| 216 | const pathStr = toPathStr(path); |
| 217 | if (pathStr === null) return undefined; |
no test coverage detected
searching dependent graphs…