Interface BuildArtifact
-
- All Superinterfaces:
BuildArtifactInfo
- All Known Subinterfaces:
IArchivedBuildArtifact,InternalBuildArtifact
- All Known Implementing Classes:
AbstractBuildArtifact,ArchivedBuildArtifact,BuildArtifactDelegate,BuildArtifactImpl,ExternalBuildArtifactFile,ExternalBuildArtifactFolder,VfsExternalFile
public interface BuildArtifact extends BuildArtifactInfo
Represents build artifact file- Since:
- 6.5
- Author:
- Eugene Petrenko (eugene.petrenko@gmail.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<BuildArtifact>getChildren()Returns sub items of the artifact.InputStreamgetInputStream()Creates input stream for this artifact.longgetSize()Computes artifact size.longgetTimestamp()booleanisArchive()booleanisContainer()booleanisDirectory()booleanisFile()-
Methods inherited from interface jetbrains.buildServer.serverSide.artifacts.BuildArtifactInfo
getName, getRelativePath
-
-
-
-
Method Detail
-
isDirectory
boolean isDirectory()
- Returns:
- true if this artifact represents a directory
- Since:
- 6.5
-
isArchive
boolean isArchive()
- Returns:
- true if this artifact is archive file (.zip, .jar, .tar.gz, etc.)
- Since:
- 8.0
-
isFile
boolean isFile()
- Returns:
- true if this artifact is regular file (may be archive at the same time)
- Since:
- 8.0
-
isContainer
boolean isContainer()
- Returns:
- true if this artifact is directory or (archive if used BuildArtifactsViewMode with isViewArchivesContent == true)
- Since:
- 8.0
-
getSize
long getSize()
Computes artifact size. This method is not recursive.- Returns:
- artifact size for file or 0 otherwise
- Since:
- 6.5
-
getTimestamp
long getTimestamp()
- Returns:
- artifact last modification timestamp
- Since:
- 6.5
-
getInputStream
@NotNull InputStream getInputStream() throws IOException
Creates input stream for this artifact. Client must close the stream at end Exception will be thrown if artifact does not contains content- Returns:
- file content or null
- Throws:
IOException- Since:
- 6.5
-
getChildren
@NotNull Collection<BuildArtifact> getChildren()
Returns sub items of the artifact. Sub items is child artifacts if artifacts is directory. Or returns archive root's child if used BuildArtifactsViewMode with isViewArchivesContent==true- Returns:
- see above
- Since:
- 6.5
-
-