MCPcopy
hub / github.com/AlistGo/alist / Put

Method Put

drivers/ftps/driver.go:116–125  ·  view source on GitHub ↗
(ctx context.Context, dstDir model.Obj, s model.FileStreamer, up driver.UpdateProgress)

Source from the content-addressed store, hash-verified

114}
115
116func (d *FTPS) Put(ctx context.Context, dstDir model.Obj, s model.FileStreamer, up driver.UpdateProgress) error {
117 if err := d.login(); err != nil {
118 return err
119 }
120 path := stdpath.Join(dstDir.GetPath(), s.GetName())
121 return d.conn.Stor(encode(path, d.Encoding), driver.NewLimitedUploadStream(ctx, &driver.ReaderUpdatingProgress{
122 Reader: s,
123 UpdateProgress: up,
124 }))
125}
126
127var _ driver.Driver = (*FTPS)(nil)

Callers

nothing calls this directly

Calls 5

loginMethod · 0.95
NewLimitedUploadStreamFunction · 0.92
encodeFunction · 0.70
GetPathMethod · 0.65
GetNameMethod · 0.65

Tested by

no test coverage detected