file

package
v0.0.0-...-b64f8f9 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateSize

func CalculateSize(items ...string) (total int64, err error)

Calculates to total amount of bytes from a list of files/directories

func Encrypt

func Encrypt(fullPath string, passPhrase string) (resultFile *os.File, err error)

func IsEmail

func IsEmail(str string) bool

IsEmail check if the string is an email.

func UploadFile

func UploadFile(url string, inputFile os.File, inputReader io.Reader, sender string, email string) (string, error)

func ZippyMcZipface

func ZippyMcZipface(targetName string, reporter func(w int64), items ...string) (err error)

Creates a zipfile from a list of files/directories

http://blog.ralch.com/tutorial/golang-working-with-zip/

Types

type ProgressWriter

type ProgressWriter struct {
	io.Writer
	Reporter func(r int64)
}

Similar to: http://stackoverflow.com/questions/26050380/go-tracking-post-request-progress

func (*ProgressWriter) Write

func (pw *ProgressWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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