MCPcopy
hub / github.com/rclone/rclone / updateData

Method updateData

backend/cache/object.go:101–110  ·  view source on GitHub ↗
(ctx context.Context, source fs.Object)

Source from the content-addressed store, hash-verified

99}
100
101func (o *Object) updateData(ctx context.Context, source fs.Object) {
102 o.Object = source
103 o.CacheModTime = source.ModTime(ctx).UnixNano()
104 o.CacheSize = source.Size()
105 o.CacheStorable = source.Storable()
106 o.CacheTs = time.Now()
107 o.cacheHashesMu.Lock()
108 o.CacheHashes = make(map[hash.Type]string)
109 o.cacheHashesMu.Unlock()
110}
111
112// Fs returns its FS info
113func (o *Object) Fs() fs.Info {

Callers 3

ObjectFromOriginalFunction · 0.95
refreshFromSourceMethod · 0.95

Calls 5

ModTimeMethod · 0.65
SizeMethod · 0.65
StorableMethod · 0.65
LockMethod · 0.65
UnlockMethod · 0.65

Tested by 1