aboutsummaryrefslogtreecommitdiff
path: root/src/Locations/FoldersLocationService.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/Locations/FoldersLocationService.kt')
-rw-r--r--src/Locations/FoldersLocationService.kt10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Locations/FoldersLocationService.kt b/src/Locations/FoldersLocationService.kt
index 4f56475c..ce202cfe 100644
--- a/src/Locations/FoldersLocationService.kt
+++ b/src/Locations/FoldersLocationService.kt
@@ -6,14 +6,14 @@ public fun FoldersLocationService(root: String): FoldersLocationService = Folder
public class FoldersLocationService(val root: File, val extension: String) : FileLocationService {
override fun withExtension(newExtension: String): LocationService = FoldersLocationService(root, newExtension)
- override fun location(node: DocumentationNode): FileLocation {
- return FileLocation(File(root, relativePathToNode(node)).appendExtension(extension))
+ override fun location(qualifiedName: List<String>, hasMembers: Boolean): FileLocation {
+ return FileLocation(File(root, relativePathToNode(qualifiedName, hasMembers)).appendExtension(extension))
}
}
-fun relativePathToNode(node: DocumentationNode): String {
- val parts = node.path.map { identifierToFilename(it.name) }.filterNot { it.isEmpty() }
- return if (node.members.none()) {
+fun relativePathToNode(qualifiedName: List<String>, hasMembers: Boolean): String {
+ val parts = qualifiedName.map { identifierToFilename(it) }.filterNot { it.isEmpty() }
+ return if (!hasMembers) {
// leaf node, use file in owner's folder
parts.joinToString("/")
} else {