unrar

package module
v0.0.0-...-a767002 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

README

go unrar

Go Reference

Work with rar files in go

Install

go get -v https://github.com/mpendlebury/gounrar

Usage

import "github.com/markpendlebury/gounrar"

func Unrar {
	err := unrar.RarExtractor("myrarfile.rar", "folder/to/extract/to/")
	if err != nil{
		fmt.ErrorF("Error unpacking rar file: %v", err)
	}
}

func GetFilenameFromWithinArchive {
	filename, err := unrar.GetRarContents("myrarfile.rar")
	if err != nil {
		fmt.ErrorF("Error getting rar contents: %v", err)
	}
	fmt.Println("Found: " + filename)
}

TODO

  • Unpack rar file
  • Get first filename from within an archive
  • Get a list of files from within an archive
  • Get file size(s) from within an archive

Credits

Jagadeesh Kotra for the base concept Nicholas Waples for rardecode

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRarContents

func GetRarContents(source string) (string, error)

Get filename(s) from within the Archive

func RarExtractor

func RarExtractor(source string, destination string) error

Extract Rar files from the source into destination

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL