packageFromPath

fun packageFromPath(root: Path, path: Path): String

Derives a dotted Kotlin package name from a directory path relative to root.

Convenience overload that relativizes the two paths first, then delegates to packageFromRelativePath.

Return

dotted package name

Parameters

root

the base path (e.g. project root, or src/main/kotlin)

path

the target directory

Throws

if any path segment is invalid

Generated with STIG