MCPcopy Index your code
hub / github.com/celer-pkg/celer / Refresh

Method Refresh

configs/pkgcache_config.go:37–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37func (p *PkgCacheConfig) Refresh() error {
38 if p.Dir == "" {
39 return fmt.Errorf("pkgcache dir is empty")
40 }
41 if !fileio.PathExists(p.Dir) {
42 return fmt.Errorf("pkgcache dir does not exist: %s", p.Dir)
43 }
44
45 // Create valid artifact config and repo config.
46 p.artifactConfig = pkgcache.NewArtifactConfig(p.ctx, p.Writable)
47 p.repoConfig = pkgcache.NewRepoConfig(p.ctx, p.Writable)
48
49 return nil
50}
51
52func (p PkgCacheConfig) GetDir(dirType context.PkgCacheDirType) string {
53 switch dirType {

Callers 7

SetPkgCacheDirMethod · 0.80
SetPkgCacheWritableMethod · 0.80
CacheArtifactsMethod · 0.80
CacheDownloadsMethod · 0.80
InitWithPlatformMethod · 0.80

Calls 3

PathExistsFunction · 0.92
NewArtifactConfigFunction · 0.92
NewRepoConfigFunction · 0.92

Tested by 2