()
| 68 | } |
| 69 | |
| 70 | private readFileInfo() { |
| 71 | this.fileInfo = []; |
| 72 | let offset = 0; |
| 73 | |
| 74 | while (offset < this.buffer.byteLength - 512) { |
| 75 | const fileName = this.readFileName(offset); |
| 76 | if (!fileName) { |
| 77 | break; |
| 78 | } |
| 79 | const fileType = this.readFileType(offset); |
| 80 | const fileSize = this.readFileSize(offset); |
| 81 | const fileMode = this.readFileMode(offset); |
| 82 | const fileMtime = this.readFileMtime(offset); |
| 83 | const fileUser = this.readFileUser(offset); |
| 84 | const fileGroup = this.readFileGroup(offset); |
| 85 | |
| 86 | this.fileInfo.push({ |
| 87 | name: fileName, |
| 88 | type: fileType, |
| 89 | size: fileSize, |
| 90 | headerOffset: offset, |
| 91 | mode: fileMode, |
| 92 | mtime: fileMtime, |
| 93 | user: fileUser, |
| 94 | group: fileGroup, |
| 95 | }); |
| 96 | |
| 97 | offset += 512 + 512 * Math.floor((fileSize + 511) / 512); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | private readString(offset: number, maxSize: number) { |
| 102 | let size = 0; |
no test coverage detected