aboutsummaryrefslogtreecommitdiff
path: root/src/Locations/SingleFolderLocationService.kt
blob: 4f9269599a2c6f5c74723fd114f7c5f75d9a1e1c (plain)
1
2
3
4
5
6
7
8
9
10
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 { identifierToFilename(it.name) }.joinToString("-")
        return Location(File(root, filename))
    }
}