MCPcopy Create free account
hub / github.com/error311/FileRise / read

Method read

src/FileRise/Storage/CurlReadStream.php:109–127  ·  view source on GitHub ↗
(int $length)

Source from the content-addressed store, hash-verified

107 }
108
109 public function read(int $length)
110 {
111 if ($this->closed) {
112 return '';
113 }
114
115 if ($length <= 0) {
116 while (!$this->done) {
117 $this->pump(1);
118 }
119 return $this->consumeAvailable(null);
120 }
121
122 if ($this->availableBytes() <= 0 && !$this->done) {
123 $this->pump(1);
124 }
125
126 return $this->consumeAvailable($length);
127 }
128
129 public function close(): void
130 {

Callers

nothing calls this directly

Calls 3

pumpMethod · 0.95
consumeAvailableMethod · 0.95
availableBytesMethod · 0.95

Tested by

no test coverage detected