Skip to content

akbarhabiby/sevenzip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sevenzip

A Golang wrapper for 7-Zip

Installation

go get -u github.com/akbarhabiby/sevenzip

You should have the a 7-Zip executable available in your system.

Usage

package main

import (
	"context"

	"github.com/akbarhabiby/sevenzip"
)

func main() {
	ctx := context.Background()
	sw := sevenzip.NewSwitches()

	cmd := sevenzip.ExtractFullContext(ctx, "./archive.7z", "./output/dir/", sw)

	// cmd.Stdout = outReader
	// cmd.Stderr = errReader

	err := cmd.Run()
	if err != nil {
		// ... do something with error
		return
	}
}

With ❤️ from akbarhabiby

Releases

No releases published

Packages

No packages published

Languages