api / org.gradle.api.resources / TextResourceFactory / fromArchiveEntry

fromArchiveEntry

abstract fun fromArchiveEntry(archive: Any, entryPath: String, charset: String): TextResource

Creates a text resource backed by the archive entry at the given path within the given archive. The archive format is determined based on the archive's file extension. If the archive format is not supported or cannot be determined, any attempt to access the resource will fail with an exception.

Parameters

archive - an archive file evaluated as per org.gradle.api.Project#files(Object...)

entryPath - the path to an archive entry

charset - the archive entry's character encoding (e.g. "utf-8")

Return
a text resource backed by the archive entry at the given path within the given archive

abstract fun fromArchiveEntry(archive: Any, path: String): TextResource

Same as fromArchiveEntry(archive, path, Charset.defaultCharset().name()).