Exist check both archive file and build desc file exist.
(nameVersion, hash string)
| 197 | |
| 198 | // Exist check both archive file and build desc file exist. |
| 199 | func (a ArtifactConfig) Exist(nameVersion, hash string) bool { |
| 200 | platformName := a.ctx.Platform().GetName() |
| 201 | projectName := a.ctx.Project().GetName() |
| 202 | buildType := a.ctx.BuildType() |
| 203 | artifactCacheDir := a.ctx.PkgCacheConfig().GetDir(context.PkgCacheDirArtifacts) |
| 204 | archivePath := filepath.Join(artifactCacheDir, platformName, projectName, buildType, nameVersion, hash+".tar.gz") |
| 205 | metaFilePath := filepath.Join(artifactCacheDir, platformName, projectName, buildType, nameVersion, "metas", hash+".meta") |
| 206 | return fileio.PathExists(archivePath) && fileio.PathExists(metaFilePath) |
| 207 | } |
nothing calls this directly
no test coverage detected