(onError?: (error: any) => any)
| 795 | } |
| 796 | |
| 797 | public getEntitiesSync(onError?: (error: any) => any): Array<FileSystemEntity> { |
| 798 | const fileInfos = getFileAccess().getEntities(this.path, onError); |
| 799 | if (!fileInfos) { |
| 800 | return null; |
| 801 | } |
| 802 | |
| 803 | const entities = new Array<FileSystemEntity>(); |
| 804 | for (let i = 0; i < fileInfos.length; i++) { |
| 805 | if (fileInfos[i].extension) { |
| 806 | entities.push(createFile(fileInfos[i])); |
| 807 | } else { |
| 808 | entities.push(createFolder(fileInfos[i])); |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | return entities; |
| 813 | } |
| 814 | |
| 815 | public eachEntity(onEntity: (entity: FileSystemEntity) => boolean) { |
| 816 | if (!onEntity) { |
no test coverage detected