package ioutil

import "github.com/coreos/etcd/pkg/ioutil"

Index

Functions

func NewLimitedBufferReader

func NewLimitedBufferReader(r io.Reader, n int) io.Reader

NewLimitedBufferReader returns a reader that reads from the given reader but limits the amount of data returned to at most n bytes.

func WriteAndSyncFile

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

WriteAndSyncFile behaviors just like ioutil.WriteFile in standard library but calls Sync before closing the file. WriteAndSyncFile guarantees the data is synced if there is no error returned.

Source Files

reader.go util.go

Version
v2.2.5+incompatible
Published
Feb 1, 2016
Platform
darwin/amd64
Imports
2 packages
Last checked
46 minutes ago

Tools for package owners.