MCPcopy
hub / github.com/kopia/kopia / writeTempFileAtomic

Function writeTempFileAtomic

repo/content/write_temp_file.go:40–42  ·  view source on GitHub ↗
(dirname string, data []byte)

Source from the content-addressed store, hash-verified

38}
39
40func writeTempFileAtomic(dirname string, data []byte) (filename string, err error) {
41 return writeTempFileAtomicImp(localFS{}, dirname, data)
42}
43
44func writeTempFileAtomicImp(fsi fsInterface, dirname string, data []byte) (filename string, err error) {
45 // write to a temp file to avoid race where two processes are writing at the same time.

Callers 1

addContentToCacheMethod · 0.85

Calls 1

writeTempFileAtomicImpFunction · 0.85

Tested by

no test coverage detected