aboutsummaryrefslogtreecommitdiff
path: root/plugins/all-modules-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt
blob: 9b5251ac4ee6f037357fe3d547cc122ea37a8aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package org.jetbrains.dokka.allModulesPage.templates

import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
import org.jetbrains.dokka.plugability.DokkaContext
import java.io.File
import java.nio.file.Files

class FallbackTemplateProcessingStrategy(dokkaContext: DokkaContext) : TemplateProcessingStrategy {

    override suspend fun process(input: File, output: File): Boolean  = coroutineScope {
        launch(IO) {
            Files.copy(input.toPath(), output.toPath())
        }
        true
    }
}