Christopher Hübner
03/12/2024, 8:20 AMprivate inline fun String.isValidFile() = File(this).exists() && File(this).isFileephemient
03/12/2024, 8:27 AMephemient
03/12/2024, 8:28 AMephemient
03/12/2024, 8:28 AMinline, then you're always paying the space tradeoff, no choiceephemient
03/12/2024, 8:29 AMSebastian Schuberth
03/12/2024, 8:46 AMisFile == true implies exists() == true, so just use the former.Klitos Kyriacou
03/12/2024, 9:32 AMjava.nio features instead of the old <http://java.io|java.io> ones:
private fun String.isValidFile() = Path(this).isRegularFile()