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

Method Write

taskfile/node_cache.go:31–36  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

29}
30
31func (node *CacheNode) Write(data []byte) error {
32 if err := node.CreateCacheDir(); err != nil {
33 return err
34 }
35 return os.WriteFile(node.Location(), data, 0o644)
36}
37
38func (node *CacheNode) ReadTimestamp() time.Time {
39 b, err := os.ReadFile(node.timestampPath())

Callers 3

readRemoteNodeContentMethod · 0.95
NewSnippetFunction · 0.45
checksumFunction · 0.45

Calls 2

CreateCacheDirMethod · 0.95
LocationMethod · 0.95

Tested by

no test coverage detected