aboutsummaryrefslogtreecommitdiff
path: root/src/Locations/SingleFolderLocationService.kt
blob: aefab4508d83926bddfad37e7cb72a7b5f0050d5 (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) : FileLocationService {
    override fun location(node: DocumentationNode): FileLocation {
        val filename = node.path.map { identifierToFilename(it.name) }.joinToString("-")
        return FileLocation(File(root, filename))
    }
}