MCPcopy Create free account
hub / github.com/celer-pkg/celer / GetDir

Method GetDir

configs/pkgcache_config.go:52–66  ·  view source on GitHub ↗
(dirType context.PkgCacheDirType)

Source from the content-addressed store, hash-verified

50}
51
52func (p PkgCacheConfig) GetDir(dirType context.PkgCacheDirType) string {
53 switch dirType {
54 case context.PkgCacheDirArtifacts:
55 return filepath.Join(p.Dir, "artifacts-"+Version)
56
57 case context.PkgCacheDirRepos:
58 return filepath.Join(p.Dir, "repos")
59
60 case context.PkgCacheDirDownloads:
61 return filepath.Join(p.Dir, "downloads")
62
63 default:
64 return p.Dir
65 }
66}
67
68func (p PkgCacheConfig) IsWritable() bool {
69 return p.Writable

Callers 1

Calls

no outgoing calls

Tested by 1