Home | History | Annotate | Download | only in io

Lines Matching defs:Copy

169 // The Copy function uses ReaderFrom if available.
180 // The Copy function uses WriterTo if available.
336 // the copy is implemented using it.
338 written, err = Copy(dst, LimitReader(src, n))
349 // Copy copies from src to dst until either EOF is reached
353 // A successful Copy returns err == nil, not err == EOF.
354 // Because Copy is defined to read from src until EOF, it does
358 // the copy is implemented by calling src.WriteTo(dst).
360 // the copy is implemented by calling dst.ReadFrom(src).
361 func Copy(dst Writer, src Reader) (written int64, err error) {
365 // CopyBuffer is identical to Copy except that it stages through the
376 // copyBuffer is the actual implementation of Copy and CopyBuffer.
379 // If the reader has a WriteTo method, use it to do the copy.
380 // Avoids an allocation and a copy.
384 // Similarly, if the writer has a ReadFrom method, use it to do the copy.