()
| 388 | function createFs(url) { |
| 389 | return { |
| 390 | async lsDir() { |
| 391 | const files = []; |
| 392 | const entries = await internalFs.listDir(url); |
| 393 | |
| 394 | entries.map((entry) => { |
| 395 | const url = decodeURIComponent(entry.nativeURL); |
| 396 | const name = Url.basename(url); |
| 397 | files.push({ |
| 398 | name, |
| 399 | url, |
| 400 | isDirectory: entry.isDirectory, |
| 401 | isFile: entry.isFile, |
| 402 | }); |
| 403 | }); |
| 404 | |
| 405 | return files; |
| 406 | }, |
| 407 | async readFile(encoding) { |
| 408 | let { data } = await internalFs.readFile(url, encoding); |
| 409 |