kales-cli / kales.cli / java.io.File

Extensions for java.io.File

printConflict

fun File.printConflict(): Unit

printCreated

fun File.printCreated(): Unit

printIdentical

fun File.printIdentical(): Unit

printSkipped

fun File.printSkipped(): Unit

printStatus

fun File.printStatus(status: String): Unit

relativePathToWorkingDir

fun File.relativePathToWorkingDir(): String

Returns a String with the path from this File relative to the current working dir (user.dir)

safeListFiles

fun File.safeListFiles(): List<File>

Like list() but returns empty list instead of null

writeTextWithLogging

fun File.writeTextWithLogging(text: String, charset: Charset = Charsets.UTF_8): Unit

Print messages about file changes when writing text to it