Path
Converts the provided path string to a Path object of the default filesystem.
inline fun Path(path: String): Path(source)
import kotlin.io.path.*
fun main() {
val path = Path("sample.txt")
if (!path.exists()) {
path.writeText("Hello Kotlin Path!")
}
println("File content: ${path.readText()}")
}