fopt

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: GPL-3.0 Imports: 8 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

func Delete added in v1.1.1

func Delete(p ...string) error

Delete delete files,p must have at least one value

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