dir

fun ScriptScope.dir(dirPath: String, body: DirScope.() -> Unit)(source)
fun ScriptScope.dir(dirPath: Path, body: DirScope.() -> Unit)(source)

A scoping function to execute a code block within the context of a DirScope instance, which adapts the path in the scope context at ScopeContext.path to the given value of dirPath. The value of dirPath is automatically resolved if it is a relative path.

Parameters

dirPath

The path of the directory that should be applied onto the path of the current scope context.

body

The function body that will be executed in the context of the DirScope instance.