MCPcopy
hub / github.com/kopia/kopia / writeFile

Function writeFile

internal/fshasher/fshasher.go:131–139  ·  view source on GitHub ↗
(ctx context.Context, w io.Writer, f fs.File)

Source from the content-addressed store, hash-verified

129}
130
131func writeFile(ctx context.Context, w io.Writer, f fs.File) error {
132 r, err := f.Open(ctx)
133 if err != nil {
134 return err
135 }
136 defer r.Close() //nolint:errcheck
137
138 return iocopy.JustCopy(w, r)
139}

Callers 1

writeFunction · 0.85

Calls 3

JustCopyFunction · 0.92
OpenMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected