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

Method discard

internal/caches/reader_file.go:388–399  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

386}
387
388func (this *FileReader) discard() error {
389 _ = this.fp.Close()
390 this.isClosed = true
391
392 // close open file cache
393 if this.openFileCache != nil {
394 this.openFileCache.Close(this.fp.Name())
395 }
396
397 // remove file
398 return fsutils.Remove(this.fp.Name())
399}

Callers 5

InitAutoDiscardMethod · 0.95
ReadHeaderMethod · 0.95
ReadBodyMethod · 0.95
ReadMethod · 0.95
ReadBodyRangeMethod · 0.95

Calls 3

CloseMethod · 0.65
NameMethod · 0.65
RemoveMethod · 0.65

Tested by

no test coverage detected