-
-
Save jmfayard/c9e9b2d7b71e5820825022fdb0582996 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// commonMain | |
expect val fileSystem: FileSystem | |
fun fileIsReadable(filePath: String): Boolean = | |
fileSystem.exists(filePath.toPath()) | |
fun readAllText(filePath: String): String = | |
fileSystem.read(filePath.toPath()) { | |
readUtf8() | |
} | |
fun writeAllText(filePath: String, text: String): Unit = | |
fileSystem.write(filePath.toPath()) { | |
writeUtf8(text) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment