MCPcopy
hub / github.com/syncthing/syncthing / createEmptyFileInfo

Function createEmptyFileInfo

lib/model/folder_sendrecv_test.go:101–110  ·  view source on GitHub ↗
(t *testing.T, name string, fs fs.Filesystem)

Source from the content-addressed store, hash-verified

99}
100
101func createEmptyFileInfo(t *testing.T, name string, fs fs.Filesystem) protocol.FileInfo {
102 t.Helper()
103
104 writeFile(t, fs, name, nil)
105 fi, err := fs.Stat(name)
106 must(t, err)
107 file, err := scanner.CreateFileInfo(fi, name, fs, false, false, config.XattrFilter{})
108 must(t, err)
109 return file
110}
111
112// Sets up a folder and model, but makes sure the services aren't actually running.
113func setupSendReceiveFolder(t testing.TB, files ...protocol.FileInfo) (*testModel, *sendReceiveFolder) {

Callers 3

TestDeleteBehindSymlinkFunction · 0.85

Calls 5

CreateFileInfoFunction · 0.92
mustFunction · 0.85
HelperMethod · 0.80
writeFileFunction · 0.70
StatMethod · 0.65

Tested by

no test coverage detected