MCPcopy Create free account
hub / github.com/rclone/rclone / SetModTime

Method SetModTime

backend/hdfs/object.go:47–55  ·  view source on GitHub ↗

SetModTime sets the modification time of the local fs object

(ctx context.Context, modTime time.Time)

Source from the content-addressed store, hash-verified

45
46// SetModTime sets the modification time of the local fs object
47func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error {
48 realpath := o.fs.realpath(o.Remote())
49 err := o.fs.client.Chtimes(realpath, modTime, modTime)
50 if err != nil {
51 return err
52 }
53 o.modTime = modTime
54 return nil
55}
56
57// Storable returns whether this object is storable
58func (o *Object) Storable() bool {

Callers 1

UpdateMethod · 0.95

Calls 3

RemoteMethod · 0.95
ChtimesMethod · 0.65
realpathMethod · 0.45

Tested by

no test coverage detected