MCPcopy Create free account
hub / github.com/git-lfs/git-lfs / Read

Method Read

tools/copycallback.go:77–88  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

75}
76
77func (w *CallbackReader) Read(p []byte) (int, error) {
78 n, err := w.Reader.Read(p)
79
80 if n > 0 {
81 w.ReadSize += int64(n)
82
83 if (err == nil || err == io.EOF) && w.C != nil {
84 err = w.C(w.TotalSize, w.ReadSize, n)
85 }
86 }
87 return n, err
88}
89
90// prevent import cycle
91type ReadSeekCloser interface {

Callers 4

TestReadWithCallbackFunction · 0.95
ReadMethod · 0.45

Calls

no outgoing calls