Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
add Archive method to SevenZip. close #360 (#364)
Browse files Browse the repository at this point in the history
Co-authored-by: Nikolay Matrosov [email protected] <[email protected]>
  • Loading branch information
nikolaymatrosov and Nikolay Matrosov [email protected] authored Jan 10, 2023
1 parent 62ea369 commit f1ef6eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions 7z.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ func (z SevenZip) Match(filename string, stream io.Reader) (MatchResult, error)
return mr, nil
}

// Archive is not implemented for 7z, but the method exists so that SevenZip satisfies the ArchiveFormat interface.
func (z SevenZip) Archive(_ context.Context, _ io.Writer, _ []File) error {
return fmt.Errorf("not implemented for 7z because there is no pure Go implementation found")
}

// Extract extracts files from z, implementing the Extractor interface. Uniquely, however,
// sourceArchive must be an io.ReaderAt and io.Seeker, which are oddly disjoint interfaces
// from io.Reader which is what the method signature requires. We chose this signature for
Expand Down

0 comments on commit f1ef6eb

Please sign in to comment.