ioutil2

package
v0.0.0-...-0df215e Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrExceedLimit = errors.New("write exceed limit")

Functions

func FileExists

func FileExists(name string) bool

Check file exists or not

func WriteFileAtomic

func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error

Write file to temp and atomically move when everything else succeeds.

Types

type SectionWriter

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

func NewSectionWriter

func NewSectionWriter(w io.WriterAt, off int64, n int64) *SectionWriter

func (*SectionWriter) Seek

func (s *SectionWriter) Seek(offset int64, whence int) (int64, error)

func (*SectionWriter) Size

func (s *SectionWriter) Size() int64

Size returns the size of the section in bytes.

func (*SectionWriter) Write

func (s *SectionWriter) Write(p []byte) (n int, err error)

func (*SectionWriter) WriteAt

func (s *SectionWriter) WriteAt(p []byte, off int64) (n int, err error)

Jump to

Keyboard shortcuts

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