From a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 14 Jul 2014 15:00:33 +0400 Subject: Location services, formatting services, initial self-documentation output. --- src/Locations/SingleFolderLocationService.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/Locations/SingleFolderLocationService.kt (limited to 'src/Locations/SingleFolderLocationService.kt') diff --git a/src/Locations/SingleFolderLocationService.kt b/src/Locations/SingleFolderLocationService.kt new file mode 100644 index 00000000..8fc6a201 --- /dev/null +++ b/src/Locations/SingleFolderLocationService.kt @@ -0,0 +1,11 @@ +package org.jetbrains.dokka + +import java.io.File + +public fun SingleFolderLocationService(root: String): SingleFolderLocationService = SingleFolderLocationService(File(root)) +public class SingleFolderLocationService(val root: File) : LocationService { + override fun location(node: DocumentationNode): Location { + val filename = node.path.map { escapeUri(it.name) }.joinToString("-") + return Location(File(root, filename)) + } +} \ No newline at end of file -- cgit