MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / readToBuff

Method readToBuff

internal/caches/reader_file.go:379–386  ·  view source on GitHub ↗
(fp *fsutils.File, buf []byte)

Source from the content-addressed store, hash-verified

377}
378
379func (this *FileReader) readToBuff(fp *fsutils.File, buf []byte) (ok bool, err error) {
380 n, err := fp.Read(buf)
381 if err != nil {
382 return false, err
383 }
384 ok = n == len(buf)
385 return
386}
387
388func (this *FileReader) discard() error {
389 _ = this.fp.Close()

Callers 2

InitAutoDiscardMethod · 0.95
InitAutoDiscardMethod · 0.80

Calls 1

ReadMethod · 0.65

Tested by

no test coverage detected