( fh: FileSystemFileHandle | FileSystemDirectoryHandle, paths: Array<string>, result: any )
| 1 | async function dealFilesFromHandlerLoop( |
| 2 | fh: FileSystemFileHandle | FileSystemDirectoryHandle, |
| 3 | paths: Array<string>, |
| 4 | result: any |
| 5 | ) { |
| 6 | if (fh.kind === 'file') { |
| 7 | const file = await fh.getFile() |
| 8 | result[paths.join('/')] = { |
| 9 | paths: [...paths], |
| 10 | size: file.size, |
| 11 | lastModified: file.lastModified, |
| 12 | file: file |
| 13 | } |
| 14 | } else if (fh.kind === 'directory') { |
| 15 | // @ts-ignore |
| 16 | for await (const fh1 of fh.entries()) { |
| 17 | await dealFilesFromHandlerLoop(fh1[1], [...paths, fh1[0]], result) |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | /** |
| 23 | * |
no outgoing calls
no test coverage detected