MCPcopy Create free account
hub / github.com/Effect-TS/effect / next

Method next

packages/effect/src/encoding/Tar.ts:1185–1195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1183 // Returns the next entry header, or `undefined` once the archive and the
1184 // input have ended. Input after the end of the archive is discarded.
1185 next(): Header | undefined | typeof NeedInput {
1186 try {
1187 return this.advance()
1188 } catch (error) {
1189 // Header errors are thrown where the archive offset is not known
1190 if (isTarError(error) && (error.kind === "InvalidHeader" || error.kind === "Unsupported")) {
1191 throw new TarError({ kind: error.kind, message: `${error.message} (header at byte ${this.at})` })
1192 }
1193 throw error
1194 }
1195 }
1196
1197 private advance(): Header | undefined | typeof NeedInput {
1198 this.generation++

Callers 1

decodeFunction · 0.95

Calls 2

advanceMethod · 0.95
isTarErrorFunction · 0.85

Tested by

no test coverage detected