UpdateContext

data class UpdateContext(val parser: ConfigParser, val targetFile: Path, val resourcePath: String, val logger: YaclaLogger?)

Represents the context used during a configuration update operation.

This context provides all necessary information to perform an update:

  • the target configuration file on disk

  • the resource path to the default configuration inside the classpath

  • the parser being used for this configuration format

  • an optional logger for outputting update process logs

It is passed to net.ririfa.yacla.loader.UpdateStrategy.updateIfNeeded to provide consistent access to the environment and resources required for updating the config file.

Constructors

Link copied to clipboard
constructor(parser: ConfigParser, targetFile: Path, resourcePath: String, logger: YaclaLogger?)

Properties

Link copied to clipboard

an optional YaclaLogger for logging update operations

Link copied to clipboard

the ConfigParser used to parse the configuration file

Link copied to clipboard

the path to the default configuration resource in the classpath

Link copied to clipboard

the Path to the target configuration file on disk