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 boolean
equals(Object that)
List<BuildArtifact>
getChildren()
Returns sub items of the artifact.ExternalBuildArtifactFile
getExternalArtifact()
InputStream
getInputStream()
Creates input stream for this artifact.String
getName()
String
getRelativePath()
long
getSize()
Computes artifact size.long
getTimestamp()
int
hashCode()
boolean
isArchive()
boolean
isContainer()
boolean
isDirectory()
boolean
isFile()
String
toString()
-
-
-
Method Detail
-
getExternalArtifact
@NotNull public ExternalBuildArtifactFile getExternalArtifact()
-
isDirectory
public final boolean isDirectory()
- Specified by:
isDirectory
in interfaceBuildArtifact
- Returns:
- true if this artifact represents a directory
- See Also:
BuildArtifact.isDirectory()
-
isArchive
public final boolean isArchive()
- Specified by:
isArchive
in 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:
isFile
in 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:
isContainer
in 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:
getSize
in interfaceBuildArtifact
- Returns:
- artifact size for file or 0 otherwise
- See Also:
BuildArtifact.getSize()
-
getTimestamp
public final long getTimestamp()
- Specified by:
getTimestamp
in 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:
getInputStream
in 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:
getChildren
in interfaceBuildArtifact
- Returns:
- see above
- See Also:
BuildArtifact.getChildren()
-
getRelativePath
@NotNull public final String getRelativePath()
- Specified by:
getRelativePath
in interfaceBuildArtifactInfo
- Returns:
- artifact relative path
- See Also:
BuildArtifactInfo.getRelativePath()
-
getName
@NotNull public final String getName()
- Specified by:
getName
in interfaceBuildArtifactInfo
- Returns:
- artifact file name
- See Also:
BuildArtifactInfo.getName()
-
equals
public final boolean equals(@Nullable Object that)
- Overrides:
equals
in classObject
- See Also:
Object.equals(Object)
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
toString
@NotNull public final String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-