FileUtil

object FileUtil

This class has method to help load static files, their contents and properties in android

Properties

Functions

Link copied to clipboard
fun getProperty(key: String?, context: Context, fileName: String): String?

This method loads a property value from a .config file in android assets

Link copied to clipboard
fun readFileFromInternalStorage(context: Context, fileName: String, dirName: String): String
Link copied to clipboard
fun readJsonFile(fileName: String): String

Method to read Json from file and return string

Link copied to clipboard

Method for returning all files in a dir

Link copied to clipboard
fun writeFileOnInternalStorage(context: Context, fileName: String, body: String = "", dirName: String)