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

Method write

internal/caches/writer_file.go:204–221  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

202}
203
204func (this *FileWriter) write(data []byte) (n int, err error) {
205 n, err = this.rawWriter.Write(data)
206 this.bodySize += int64(n)
207
208 if this.maxSize > 0 && this.bodySize > this.maxSize {
209 err = ErrEntityTooLarge
210
211 if this.storage != nil {
212 this.storage.IgnoreKey(this.key, this.maxSize)
213 }
214 }
215
216 if err != nil {
217 _ = this.Discard()
218 }
219
220 return
221}

Callers 2

WriteMethod · 0.95
tocFunction · 0.45

Calls 3

DiscardMethod · 0.95
WriteMethod · 0.65
IgnoreKeyMethod · 0.65

Tested by

no test coverage detected