MCPcopy Create free account
hub / github.com/akalin/gopar / makeDecoderMemFS

Function makeDecoderMemFS

par2/decoder_test.go:184–192  ·  view source on GitHub ↗
(workingDir string)

Source from the content-addressed store, hash-verified

182}
183
184func makeDecoderMemFS(workingDir string) memfs.MemFS {
185 return memfs.MakeMemFS(workingDir, map[string][]byte{
186 "file.rar": {0x1, 0x2, 0x3, 0x4},
187 filepath.Join("dir1", "file.r01"): {0x5, 0x6, 0x7},
188 filepath.Join("dir1", "file.r02"): {0x8, 0x9, 0xa, 0xb, 0xc},
189 filepath.Join("dir2", "dir3", "file.r03"): {0xe, 0xf},
190 filepath.Join("dir4", "dir5", "file.r04"): {0xd},
191 })
192}
193
194func perturbFile(t *testing.T, fs memfs.MemFS, path string) {
195 data, err := fs.ReadFile(path)

Callers 6

testRepairFunction · 0.70
testVerifyFunction · 0.70
testShardCountsFunction · 0.70
testDecoderVerifyFunction · 0.70
TestSetIDMismatchFunction · 0.70
testDecoderRepairFunction · 0.70

Calls 1

MakeMemFSFunction · 0.92

Tested by

no test coverage detected