GitLabFile

constructor(repo: GitLabRepo, branchName: String, srcPath: String, fileName: String, connectTimeout: Duration = DEFAULT_CONNECT_TIMEOUT, readTimeout: Duration = DEFAULT_READ_TIMEOUT, fetchTimeout: Duration = Duration.INFINITE, maxBytes: Long = Long.MAX_VALUE, followRedirects: Boolean = false)

Parameters

repo

the GitLab repository

branchName

the branch or tag name

srcPath

the directory path within the repository

fileName

the file name

connectTimeout

the maximum time to wait for a connection (default 10 seconds)

readTimeout

the maximum time to wait for data once connected (default 30 seconds)

fetchTimeout

the maximum time for the whole fetch (default none); see UrlSource

maxBytes

the largest body accepted, in bytes (default no limit); see UrlSource

followRedirects

whether to follow HTTP redirects (default false); see UrlSource


constructor(repo: GitLabRepo, branchName: String, srcPath: String, fileName: String)

Creates a GitLabFile with the default timeouts and limits.


constructor(repo: GitLabRepo, branchName: String, srcPath: String, fileName: String, connectTimeout: Duration, readTimeout: Duration, fetchTimeout: Duration, maxBytes: Long, followRedirects: Boolean)

Creates a GitLabFile with timeouts given as java.time.Duration and every limit, for Java callers: the constructor taking Kotlin durations cannot be called from Java.

Parameters

repo

the GitLab repository

branchName

the branch or tag name

srcPath

the directory path within the repository

fileName

the file name

connectTimeout

the maximum time to wait for a connection

readTimeout

the maximum time to wait for data once connected

fetchTimeout

the maximum time for the whole fetch; java.time.Duration.ZERO means none

maxBytes

the largest body accepted, in bytes; Long.MAX_VALUE means no limit

followRedirects

whether to follow HTTP redirects