All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.files.kt Maven / Gradle / Ivy

There is a newer version: 0.77.0
Show newest version
package de.peekandpoke.ultra.common

import java.io.File

fun File.ensureDirectory() = apply {
    if (!exists()) {
        mkdirs()
    }
}

fun File.cleanDirectory() = apply {
    deleteRecursively()
    ensureDirectory()
}

fun File.child(child: File) = File(this, child.path)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy