filebak

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIZE_K = 1024
	SIZE_M = 1024 * SIZE_K
	SIZE_G = 1024 * SIZE_M
)

Variables

This section is empty.

Functions

func SizeToStr

func SizeToStr(size int64) string

func StrToSize

func StrToSize(hum string) int64

Types

type File

type File struct {
	*os.File
	// contains filtered or unexported fields
}

func OpenFile

func OpenFile(fileName string, maxSize int64, bakNum int) (*File, error)

func (*File) Truncate

func (lf *File) Truncate(size int64) error

func (*File) Write

func (lf *File) Write(data []byte) (int, error)

Rewrite

func (*File) WriteAt

func (lf *File) WriteAt(b []byte, off int64) (n int, err error)

func (*File) WriteString

func (lf *File) WriteString(s string) (n int, err error)

Jump to

Keyboard shortcuts

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