(dirType context.PkgCacheDirType)
| 50 | } |
| 51 | |
| 52 | func (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 | |
| 68 | func (p PkgCacheConfig) IsWritable() bool { |
| 69 | return p.Writable |
no outgoing calls