(onEntity: (entity: FileSystemEntity) => boolean)
| 813 | } |
| 814 | |
| 815 | public eachEntity(onEntity: (entity: FileSystemEntity) => boolean) { |
| 816 | if (!onEntity) { |
| 817 | return; |
| 818 | } |
| 819 | |
| 820 | const onSuccess = function (fileInfo: { path: string; name: string; extension: string }): boolean { |
| 821 | let entity; |
| 822 | if (fileInfo.extension) { |
| 823 | entity = createFile(fileInfo); |
| 824 | } else { |
| 825 | entity = createFolder(fileInfo); |
| 826 | } |
| 827 | |
| 828 | return onEntity(entity); |
| 829 | }; |
| 830 | |
| 831 | const onError = function (error) { |
| 832 | throw error; |
| 833 | }; |
| 834 | |
| 835 | getFileAccess().eachEntity(this.path, onSuccess, onError); |
| 836 | } |
| 837 | } |
| 838 | |
| 839 | export namespace knownFolders { |
nothing calls this directly
no test coverage detected