public interface VcsFileContentProvider extends VcsExtension
Modifier and Type | Method and Description |
---|---|
byte[] |
getContent(java.lang.String filePath,
VcsRoot versionedRoot,
java.lang.String version)
Get binary content of the single file in modification set.
|
byte[] |
getContent(VcsModification vcsModification,
VcsChangeInfo change,
VcsChangeInfo.ContentType contentType,
VcsRoot vcsRoot)
Get binary content of the single file in modification set.
|
@NotNull byte[] getContent(@NotNull VcsModification vcsModification, @NotNull VcsChangeInfo change, @NotNull VcsChangeInfo.ContentType contentType, @NotNull VcsRoot vcsRoot) throws VcsException
vcsModification
- modification set.change
- specified change of file.contentType
- specified what content should be return - before modification or after it.vcsRoot
- current settings.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.@NotNull byte[] getContent(@NotNull java.lang.String filePath, @NotNull VcsRoot versionedRoot, @NotNull java.lang.String version) throws VcsException
filePath
- file path relative to the project root,
"checkout root" from vcs root should not be includedversionedRoot
- current settings.version
- version returned by VcsModification.getVersion()
or check jetbrains.buildServer.vcs.CollectChangesPolicy.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.