MCPcopy Index your code
hub / github.com/rclone/rclone / SetModTime

Method SetModTime

backend/b2/b2.go:1924–1933  ·  view source on GitHub ↗

SetModTime sets the modification time of the Object

(ctx context.Context, modTime time.Time)

Source from the content-addressed store, hash-verified

1922
1923// SetModTime sets the modification time of the Object
1924func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error {
1925 info, err := o.getMetaData(ctx)
1926 if err != nil {
1927 return err
1928 }
1929 info.Info[timeKey] = timeString(modTime)
1930
1931 // Copy to the same name, overwriting the metadata only
1932 return o.fs.copy(ctx, o, o, info)
1933}
1934
1935// Storable returns if this object is storable
1936func (o *Object) Storable() bool {

Callers

nothing calls this directly

Calls 3

getMetaDataMethod · 0.95
timeStringFunction · 0.85
copyMethod · 0.45

Tested by

no test coverage detected