readFile

Returns the contents of the file located at path. The content is parsed according to encoding. For binary files, use encoding = ContentEncoding.Base64.

common
fun readFile(path: String, encoding: ContentEncoding): String?
fun readFile(path: String, encoding: ContentEncoding): String?
fun readFile(pathComponent: PathComponent, encoding: ContentEncoding): String?
fun readFile(path: String): ByteArray?
fun readFile(pathComponent: PathComponent): ByteArray?
fun readFile(path: String, encoding: ContentEncoding): String?
fun readFile(pathComponent: PathComponent, encoding: ContentEncoding): String?
fun readFile(path: String): ByteArray?
fun readFile(pathComponent: PathComponent): ByteArray?

Returns the contents of the file located at path. The content is parsed according to encoding. For binary files, use encoding = ContentEncoding.Base64.

js
fun readFile(path: String, encoding: ContentEncoding): String?

Returns the contents of the file located at pathComponent. The content is parsed according to encoding. For binary files, use encoding = ContentEncoding.Base64.

common
fun readFile(pathComponent: PathComponent, encoding: ContentEncoding): String?

Returns the contents of the file located at pathComponent. The content is parsed according to encoding. For binary files, use encoding = ContentEncoding.Base64.

js
fun readFile(pathComponent: PathComponent, encoding: ContentEncoding): String?

Returns the contents of the file located at path as ByteArray.

common
fun readFile(path: String): ByteArray?

Returns the contents of the file located at pathComponent as ByteArray.

common
fun readFile(pathComponent: PathComponent): ByteArray?