aboutsummaryrefslogtreecommitdiff
path: root/src/Locations/SingleFolderLocationService.kt
diff options
context:
space:
mode:
authorIlya Ryzhenkov <orangy@jetbrains.com>2014-07-14 15:00:33 +0400
committerIlya Ryzhenkov <orangy@jetbrains.com>2014-07-14 15:00:33 +0400
commita0bfdbd8cc365cb11c26e81ee7587f0ec25df79d (patch)
treec68610d2003d2a4712b3fbc95561ac20390a161d /src/Locations/SingleFolderLocationService.kt
parent6168541bd5bb141c40a1e2a909afa84441b35ed5 (diff)
downloaddokka-a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d.tar.gz
dokka-a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d.tar.bz2
dokka-a0bfdbd8cc365cb11c26e81ee7587f0ec25df79d.zip
Location services, formatting services, initial self-documentation output.
Diffstat (limited to 'src/Locations/SingleFolderLocationService.kt')
-rw-r--r--src/Locations/SingleFolderLocationService.kt11
1 files changed, 11 insertions, 0 deletions
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