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

add Archive method to SevenZip #364

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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