MCPcopy
hub / github.com/rclone/rclone / _roundModTime

Method _roundModTime

vfs/file.go:369–375  ·  view source on GitHub ↗

_roundModTime rounds the time passed in to the Precision of the underlying Fs It should be called with the lock held

(modTime time.Time)

Source from the content-addressed store, hash-verified

367//
368// It should be called with the lock held
369func (f *File) _roundModTime(modTime time.Time) time.Time {
370 precision := f.d.f.Precision()
371 if precision == fs.ModTimeNotSupported {
372 return modTime
373 }
374 return modTime.Truncate(precision)
375}
376
377// ModTime returns the modified time of the file
378//

Callers 1

ModTimeMethod · 0.95

Calls 2

PrecisionMethod · 0.65
TruncateMethod · 0.65

Tested by

no test coverage detected