Class VfsExternalFile
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.artifacts.VfsExternalFile
-
- All Implemented Interfaces:
BuildArtifact,BuildArtifactInfo
public class VfsExternalFile extends Object
Wrapper for external artifact- Since:
- 2020.1.3
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object that)List<BuildArtifact>getChildren()Returns sub items of the artifact.ExternalBuildArtifactFilegetExternalArtifact()InputStreamgetInputStream()Creates input stream for this artifact.StringgetName()StringgetRelativePath()longgetSize()Computes artifact size.longgetTimestamp()inthashCode()booleanisArchive()booleanisContainer()booleanisDirectory()booleanisFile()StringtoString()
-
-
-
Method Detail
-
getExternalArtifact
@NotNull public ExternalBuildArtifactFile getExternalArtifact()
-
isDirectory
public final boolean isDirectory()
- Specified by:
isDirectoryin interfaceBuildArtifact- Returns:
- true if this artifact represents a directory
- See Also:
BuildArtifact.isDirectory()
-
isArchive
public final boolean isArchive()
- Specified by:
isArchivein interfaceBuildArtifact- Returns:
- true if this artifact is archive file (.zip, .jar, .tar.gz, etc.)
- See Also:
BuildArtifact.isArchive()
-
isFile
public final boolean isFile()
- Specified by:
isFilein interfaceBuildArtifact- Returns:
- true if this artifact is regular file (may be archive at the same time)
- See Also:
BuildArtifact.isFile()
-
isContainer
public final boolean isContainer()
- Specified by:
isContainerin interfaceBuildArtifact- Returns:
- true if this artifact is directory or (archive if used BuildArtifactsViewMode with isViewArchivesContent == true)
- See Also:
BuildArtifact.isContainer()
-
getSize
public final long getSize()
Computes artifact size. This method is not recursive.- Specified by:
getSizein interfaceBuildArtifact- Returns:
- artifact size for file or 0 otherwise
- See Also:
BuildArtifact.getSize()
-
getTimestamp
public final long getTimestamp()
- Specified by:
getTimestampin interfaceBuildArtifact- Returns:
- artifact last modification timestamp
- See Also:
BuildArtifact.getTimestamp()
-
getInputStream
@NotNull public final 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- Specified by:
getInputStreamin interfaceBuildArtifact- Returns:
- file content or null
- Throws:
IOException- See Also:
BuildArtifact.getInputStream()
-
getChildren
@NotNull public final List<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- Specified by:
getChildrenin interfaceBuildArtifact- Returns:
- see above
- See Also:
BuildArtifact.getChildren()
-
getRelativePath
@NotNull public final String getRelativePath()
- Specified by:
getRelativePathin interfaceBuildArtifactInfo- Returns:
- artifact relative path
- See Also:
BuildArtifactInfo.getRelativePath()
-
getName
@NotNull public final String getName()
- Specified by:
getNamein interfaceBuildArtifactInfo- Returns:
- artifact file name
- See Also:
BuildArtifactInfo.getName()
-
equals
public final boolean equals(@Nullable Object that)- Overrides:
equalsin classObject- See Also:
Object.equals(Object)
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classObject- See Also:
Object.hashCode()
-
toString
@NotNull public final String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
-