MCPcopy
hub / github.com/rclone/rclone / createObject

Method createObject

backend/filescom/filescom.go:379–391  ·  view source on GitHub ↗

Creates from the parameters passed in a half finished Object which must have setMetaData called on it Returns the object and error. Used to create new objects

(ctx context.Context, remote string)

Source from the content-addressed store, hash-verified

377//
378// Used to create new objects
379func (f *Fs) createObject(ctx context.Context, remote string) (o *Object, err error) {
380 // Create the directory for the object if it doesn't exist
381 err = f.mkParentDir(ctx, remote)
382 if err != nil {
383 return
384 }
385 // Temporary Object under construction
386 o = &Object{
387 fs: f,
388 remote: remote,
389 }
390 return o, nil
391}
392
393// Put the object
394//

Callers 3

CopyMethod · 0.95
MoveMethod · 0.95
DirMoveMethod · 0.95

Calls 1

mkParentDirMethod · 0.95

Tested by

no test coverage detected