toOutputResource

fun FsEntry.toOutputResource(name: String = this.name, useChecksumInvalidation: Boolean = false, symlink: Boolean = false): OutputResource

Converts this entry to an OutputResource for the pipeline to output.

Disk-backed entries are wrapped as a FileReferenceOutputArtifact, so they are efficiently copied (or symlinked) by reference. Virtual entries are materialized into in-memory artifacts, walking directories recursively.

Return

the resource wrapping this entry

Parameters

name

the output resource name. Defaults to this entry's FsEntry.name

useChecksumInvalidation

whether disk-backed entries should also carry a checksum file, used by incremental builds to detect unchanged artifacts

symlink

whether disk-backed entries should be symlinked instead of copied