canWriteSafely

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

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

Return

whether a file or directory can be written.