RichUtils / pyxis.uzuki.live.richutilskt.utils / java.io.File

Extensions for java.io.File

getSizeByMb

fun File.getSizeByMb(): String

get human-readable size string from given file

readFile

fun File.readFile(): String

read file to string

saveBitmapToFile

fun File.saveBitmapToFile(bitmap: Bitmap, format: CompressFormat = Bitmap.CompressFormat.JPEG, quality: Int = 100): File?

Save Bitmap to given File