fkrauthan
08/22/2020, 4:41 AMvladimirsitnikov
08/22/2020, 9:55 PMsuspendCoroutine
/ resume
/ resumeWithException
so the code looks much easier to read.
Sample: https://github.com/burrunan/gradle-cache-action/blob/1b47ef06a2ad8034f3638d2eae8130d29025fa2f/wrappers/nodejs/src/main/kotlin/com/github/burrunan/wrappers/nodejs/FsExtensions.kt#L27-L30
Now exists(…)
method can be used as a regular suspending method in Kotlin, and no await or whatever is needed.
It works like if (exists(…)) {…
Is it what you ask?