Skip to content

Commit

Permalink
add Archive method to SevenZip. close mholt#360
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolay Matrosov nikolay.matrosov@gmail.com committed Jan 7, 2023
1 parent 62ea369 commit 0740add
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 0740add

Please sign in to comment.