inline fun <T> Path.runCatchingIo(block: Path.() -> T): IoResult<T>
(source)
Executes the given block and catches IOExceptions.
Exception
- any exception that is thrown by block if it is not an IOException
Return
Success with this path and block’s result if block executes successfully.
Failure with this path and the thrown IOException if block throws an IOException