fopt

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

README

Usage

func main(){
    //zip example
    fp := fopt.ZipPrepare{
        ZipName:"test.zip",
        SrcFiles: []string["f1","f2"],
    }
    if err := fp.Zip(); nil != err {
        fmt.Println(err)
        return
    }

    //unzip example
    fp1 := fopt.UnzipPrepare{
        OutPath:"./testunzip",
        SrcPath:"./test.zip",
    }

    if err := fp1.Unzip(); nil != err {
        fmt.Println(err)
        return
    }

}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnzipPrepare

type UnzipPrepare struct {
	OutPath string
	SrcPath string
}

func (*UnzipPrepare) Unzip

func (my *UnzipPrepare) Unzip() error

type ZipPrepare

type ZipPrepare struct {
	ZipName  string
	SrcFiles []string
	// contains filtered or unexported fields
}

func (*ZipPrepare) Zip

func (my *ZipPrepare) Zip() error

Jump to

Keyboard shortcuts

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