MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / Read

Method Read

pkg/filemanager/manager/entitysource/entitysource.go:508–517  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

506}
507
508func (f *entitySource) Read(p []byte) (n int, err error) {
509 if f.rsc == nil {
510 err = f.resetRequest()
511 }
512 if f.rsc != nil {
513 n, err = f.rsc.Read(p)
514 f.pos += int64(n)
515 }
516 return
517}
518
519func (f *entitySource) ReadAt(p []byte, off int64) (n int, err error) {
520 if f.rsc == nil {

Callers

nothing calls this directly

Calls 2

resetRequestMethod · 0.95
ReadMethod · 0.45

Tested by

no test coverage detected