get

suspend fun <T, TResult> get(path: Path = AbsolutePath.ROOT, valueHandler: ValueHandler<T, TResult>): TResult(source)
suspend fun <T, TResult> get(path: String, valueHandler: ValueHandler<T, TResult>): TResult(source)

Runs the provided valueHandler with the single value at path. Returns the result of valueHandler.

Because this method is meant to return a single value, paths with wildcards are not accepted. To get all values at paths matching a path containing wildcards, use valueInfo instead.

This method receives a lambda to ensure that no conflicting concurrent operations occur during the lifetime of said lambda.

Throws

If path contains wildcards, matches no schemas, or matches more than one value.

If path matches more than one value.

If no value matches path.