MCPcopy
hub / github.com/syncthing/syncthing / setupFile

Function setupFile

lib/model/folder_sendrecv_test.go:88–99  ·  view source on GitHub ↗
(filename string, blockNumbers []int)

Source from the content-addressed store, hash-verified

86}
87
88func setupFile(filename string, blockNumbers []int) protocol.FileInfo {
89 // Create existing file
90 existingBlocks := make([]protocol.BlockInfo, len(blockNumbers))
91 for i := range blockNumbers {
92 existingBlocks[i] = blocks[blockNumbers[i]]
93 }
94
95 return protocol.FileInfo{
96 Name: filename,
97 Blocks: existingBlocks,
98 }
99}
100
101func createEmptyFileInfo(t *testing.T, name string, fs fs.Filesystem) protocol.FileInfo {
102 t.Helper()

Callers 6

TestHandleFileFunction · 0.85
TestHandleFileWithTempFunction · 0.85
TestCopierFinderFunction · 0.85
TestCopierCleanupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected