ar

package
v0.0.0-...-69b65d4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStopWalk = fmt.Errorf("walk stopped")

Functions

This section is empty.

Types

type File

type File struct {
	os.FileInfo

	// The original header info; depends on
	// type of archive -- could be nil, too.
	Header interface{}

	// Allow the file contents to be read (and closed)
	io.ReadCloser
}

type Rar

type Rar struct {
	// contains filtered or unexported fields
}

func (*Rar) CheckRAR

func (r *Rar) CheckRAR(archive string) (string, error)

CheckRAR checks if the file is a RAR, ZIP, or unidentified file. returns file type and error.

func (*Rar) Close

func (r *Rar) Close() error

Close closes the rar archive(s) opened by Create and Open.

func (*Rar) Open

func (r *Rar) Open(in io.Reader, size int64) error

func (*Rar) Read

func (r *Rar) Read() (File, error)

func (*Rar) Walk

func (r *Rar) Walk(archive string, walkFn func(f File) error) error

Walk calls walkFn for each visited item in archive.

type ReadFakeCloser

type ReadFakeCloser struct {
	io.Reader
}

func (ReadFakeCloser) Close

func (rfc ReadFakeCloser) Close() error

type Zip

type Zip struct {
	// contains filtered or unexported fields
}

func (*Zip) Close

func (z *Zip) Close() error

func (*Zip) Open

func (z *Zip) Open(in io.Writer)

func (*Zip) WriteFile

func (z *Zip) WriteFile(file File) error

Jump to

Keyboard shortcuts

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