existsRSafely

fun <Error class: unknown class>?.existsRSafely(default: Boolean = false): Boolean

Extension method to check if a file exists and can be read without throwing an exception, except CancellationException to cancel parent jobs.

Return

whether a file or directory exists and can be read.