PathMaterializableAsset

data class PathMaterializableAsset(val path: Path, val name: String = path.fileName?.toString() ?: path.toString(), val mimeType: String? = null, val id: String = UUID.randomUUID().toString(), val timestamp: Instant = Instant.now(), val description: String = "Asset ") : MaterializableAsset

A MaterializableAsset backed by a file system Path.

Serializes the path location for JSON round-tripping. Note that the referenced file must remain accessible on disk when the asset is materialized or restored.

Constructors

Link copied to clipboard
constructor(path: Path, name: String = path.fileName?.toString() ?: path.toString(), mimeType: String? = null, id: String = UUID.randomUUID().toString(), timestamp: Instant = Instant.now(), description: String = "Asset ")

Properties

Link copied to clipboard
Link copied to clipboard
open val id: String
Link copied to clipboard
open override val mimeType: String? = null

MIME type of the content, preferably one of the values defined by MimeTypes. Null when the producer cannot determine it.

Link copied to clipboard
open override val name: String
Link copied to clipboard
val path: Path
Link copied to clipboard
open val timestamp: Instant

Functions

Link copied to clipboard
open override fun openStream(): InputStream
Link copied to clipboard
open fun persistent(): Boolean
Link copied to clipboard
open override fun reference(): LlmReference

Create an LLM reference