MCPcopy
hub / github.com/go-task/task / ReadTimestamp

Method ReadTimestamp

taskfile/node_cache.go:38–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36}
37
38func (node *CacheNode) ReadTimestamp() time.Time {
39 b, err := os.ReadFile(node.timestampPath())
40 if err != nil {
41 return time.Time{}.UTC()
42 }
43 timestamp, err := time.Parse(time.RFC3339, string(b))
44 if err != nil {
45 return time.Time{}.UTC()
46 }
47 return timestamp.UTC()
48}
49
50func (node *CacheNode) WriteTimestamp(t time.Time) error {
51 if err := node.CreateCacheDir(); err != nil {

Callers 1

readRemoteNodeContentMethod · 0.95

Calls 1

timestampPathMethod · 0.95

Tested by

no test coverage detected