MCPcopy
hub / github.com/rclone/rclone / PutStream

Method PutStream

backend/cache/cache.go:1525–1532  ·  view source on GitHub ↗

PutStream uploads the object

(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption)

Source from the content-addressed store, hash-verified

1523
1524// PutStream uploads the object
1525func (f *Fs) PutStream(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs.Object, error) {
1526 do := f.Fs.Features().PutStream
1527 if do == nil {
1528 return nil, errors.New("can't PutStream")
1529 }
1530 fs.Debugf(f, "put data streaming in '%s'", src.Remote())
1531 return f.put(ctx, in, src, options, do)
1532}
1533
1534// Copy src to this remote using server-side copy operations.
1535func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object, error) {

Callers

nothing calls this directly

Calls 4

putMethod · 0.95
DebugfFunction · 0.92
FeaturesMethod · 0.65
RemoteMethod · 0.65

Tested by

no test coverage detected