MCPcopy Create free account
hub / github.com/bodgit/sevenzip / ExampleOpenReader

Function ExampleOpenReader

reader_test.go:451–476  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

449}
450
451func ExampleOpenReader() {
452 r, err := sevenzip.OpenReader(filepath.Join("testdata", "multi.7z.001"))
453 if err != nil {
454 panic(err)
455 }
456
457 defer func() {
458 if err := r.Close(); err != nil {
459 panic(err)
460 }
461 }()
462
463 for _, file := range r.File {
464 fmt.Println(file.Name)
465 }
466 // Output: 01
467 // 02
468 // 03
469 // 04
470 // 05
471 // 06
472 // 07
473 // 08
474 // 09
475 // 10
476}
477
478func benchmarkArchiveParallel(b *testing.B, file string) {
479 b.Helper()

Callers

nothing calls this directly

Calls 2

OpenReaderFunction · 0.92
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…