Skip to content

Commit

Permalink
Impr
Browse files Browse the repository at this point in the history
  • Loading branch information
Krystian Panek committed Dec 22, 2019
1 parent cc7a416 commit 66f6a12
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/kotlin/com/neva/gradle/fork/config/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,15 @@ abstract class Config(val fork: ForkExtension, val name: String) {

fun removeFile(path: String) = removeFiles(listOf(path))

fun removeFiles(includes: List<String>, excludes: List<String> = listOf()) {
fun removeFiles(includes: List<String>, excludes: List<String> = listOf(), cleanEmptyDirs: Boolean = true) {
eachFiles(includes, excludes, Action { it.remove() })
if (cleanEmptyDirs) {
removeEmptyDirs()
}
}

fun removeEmptyDirs() {
action(Action { it.removeEmptyDirs() })
}

fun copyTemplateFile(templateName: String) {
Expand Down

0 comments on commit 66f6a12

Please sign in to comment.