Interface FileContentService

    • 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 jetbrains.buildServer.vcs.VcsModification#getVersion() or see jetbrains.buildServer.vcs.CollectChangesPolicy.
        targetStream - the target stream for the file content
        Throws:
        VcsException - if some problem occurred. 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 jetbrains.buildServer.vcs.VcsModification#getVersion() or see jetbrains.buildServer.vcs.CollectChangesPolicy.
        change - specified change of the file
        direction - specifies what content should be return - before modification or after it.
        Throws:
        VcsException - if some problem occurred. 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.