updateTimestamp sets the modification timestamp (mtime and atime) for the directory d to the current time.
(d string)
| 150 | // updateTimestamp sets the modification timestamp (mtime and atime) for the |
| 151 | // directory d to the current time. |
| 152 | func 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. |
| 158 | const MaxCacheAge = 30 * 24 * time.Hour |