diff options
Diffstat (limited to 'core/src/main/kotlin/Locations')
-rw-r--r-- | core/src/main/kotlin/Locations/LocationService.kt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Locations/LocationService.kt b/core/src/main/kotlin/Locations/LocationService.kt index 6b7e0511..8ea45dae 100644 --- a/core/src/main/kotlin/Locations/LocationService.kt +++ b/core/src/main/kotlin/Locations/LocationService.kt @@ -94,4 +94,10 @@ fun identifierToFilename(path: String): String { fun NodeLocationAwareGenerator.relativePathToLocation(owner: DocumentationNode, node: DocumentationNode): String { return location(owner).relativePathTo(location(node), null) +} + + +fun NodeLocationAwareGenerator.relativeToRoot(from: Location): File { + val file = File(from.path) + return file.relativeTo(root) }
\ No newline at end of file |