jetbrains.vcs.api.services
Interface FileContentService

All Superinterfaces:
VcsRemoteService, VcsService

public interface FileContentService
extends VcsService, VcsRemoteService

Represents a service for obtaining file content

Author:
kir

Method Summary
 void getContent(java.lang.String version, VcsChangeInfo change, VcsChangeInfo.ContentType direction, java.io.OutputStream targetStream)
          Get binary content of the single file in modification set.
 void getPathContent(java.lang.String filePath, java.lang.String version, java.io.OutputStream targetStream)
          Get binary content of a single file.
 

Method Detail

getPathContent

void getPathContent(@NotNull
                    java.lang.String filePath,
                    @NotNull
                    java.lang.String version,
                    @NotNull
                    java.io.OutputStream targetStream)
                    throws VcsException
Get binary content of a single file.

Parameters:
filePath - file path in VCS, relative to the VCS root
version - version returned by VcsModification.getVersion() or VcsSupportCore.getCurrentVersion(VcsRoot).
targetStream - the target stream for the file content
Throws:
VcsException - if some problem occurred.
VcsFileNotFoundException - when no such file found. If "file not found" condition cannot be detected easily the implementation may throw jetbrains.buildServer.vcs.VcsException. In this case some TeamCity functions may work inefficiently, for example the file content cache.

getContent

void getContent(@NotNull
                java.lang.String version,
                @NotNull
                VcsChangeInfo change,
                @NotNull
                VcsChangeInfo.ContentType direction,
                @NotNull
                java.io.OutputStream targetStream)
                throws VcsException
Get binary content of the single file in modification set.

Parameters:
version - version returned by VcsModification.getVersion() or VcsSupportCore.getCurrentVersion(VcsRoot).
change - specified change of the file
direction - specifies what content should be return - before modification or after it.
Throws:
VcsException - if some problem occurred.
VcsFileNotFoundException - when no such file found. If "file not found" condition cannot be detected easily the implementation may throw jetbrains.buildServer.vcs.VcsException. In this case some TeamCity functions may work inefficiently, for example the file content cache.