MCPcopy
hub / github.com/restic/restic / updateTimestamp

Function updateTimestamp

internal/backend/cache/cache.go:152–155  ·  view source on GitHub ↗

updateTimestamp sets the modification timestamp (mtime and atime) for the directory d to the current time.

(d string)

Source from the content-addressed store, hash-verified

150// updateTimestamp sets the modification timestamp (mtime and atime) for the
151// directory d to the current time.
152func updateTimestamp(d string) error {
153 t := time.Now()
154 return os.Chtimes(d, t, t)
155}
156
157// MaxCacheAge is the default age (30 days) after which cache directories are considered old.
158const MaxCacheAge = 30 * 24 * time.Hour

Callers 1

NewFunction · 0.85

Calls 1

NowMethod · 0.80

Tested by

no test coverage detected