MCPcopy
hub / github.com/syncthing/syncthing / writeFile

Function writeFile

lib/model/testutils_test.go:370–377  ·  view source on GitHub ↗
(t testing.TB, filesystem fs.Filesystem, name string, data []byte)

Source from the content-addressed store, hash-verified

368}
369
370func writeFile(t testing.TB, filesystem fs.Filesystem, name string, data []byte) {
371 t.Helper()
372 fd, err := filesystem.Create(name)
373 must(t, err)
374 defer fd.Close()
375 _, err = fd.Write(data)
376 must(t, err)
377}
378
379func writeFilePerm(t testing.TB, filesystem fs.Filesystem, name string, data []byte, perm fs.FileMode) {
380 t.Helper()

Callers 15

writeFilePermFunction · 0.70
createEmptyFileInfoFunction · 0.70
TestPullEmptyBlockFunction · 0.70
TestIgnoresFunction · 0.70
TestIssue3028Function · 0.70
TestRenameSequenceOrderFunction · 0.70
TestRenameSameFileFunction · 0.70
TestRenameBatchFlushFunction · 0.70
TestBlockListMapFunction · 0.70
TestScanRenameCaseOnlyFunction · 0.70

Calls 5

mustFunction · 0.85
HelperMethod · 0.80
CreateMethod · 0.65
CloseMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected