MCPcopy
hub / github.com/kopia/kopia / ToByteSlice

Method ToByteSlice

internal/gather/gather_write_buffer.go:106–111  ·  view source on GitHub ↗

ToByteSlice appends all bytes to the provided slice and returns it.

()

Source from the content-addressed store, hash-verified

104
105// ToByteSlice appends all bytes to the provided slice and returns it.
106func (b *WriteBuffer) ToByteSlice() []byte {
107 b.mu.Lock()
108 defer b.mu.Unlock()
109
110 return b.inner.ToByteSlice()
111}
112
113// Bytes returns inner gather.Bytes.
114func (b *WriteBuffer) Bytes() Bytes {

Callers 15

runDecompressionMethod · 0.95
verifyContentCacheFunction · 0.95
TestCacheFailureToWriteFunction · 0.95
TestCacheFailureToReadFunction · 0.95
TestContentCacheForDataFunction · 0.95
TestPersistentLRUCacheFunction · 0.95
verifyCachedFunction · 0.95
TestGatherBytesFunction · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by 15

verifyContentCacheFunction · 0.76
TestCacheFailureToWriteFunction · 0.76
TestCacheFailureToReadFunction · 0.76
TestContentCacheForDataFunction · 0.76
TestPersistentLRUCacheFunction · 0.76
verifyCachedFunction · 0.76
TestGatherBytesFunction · 0.76
TestGatherWriteBufferFunction · 0.76