getAppFilesDirOrShowError

fun getAppFilesDirOrShowError(context: Context, directoryName: String?): File

Returns the application (internal or external) directory with provided name (creates if needed). On failure shows toast message.

Return

internal directory with provided name (creates if needed)

Parameters

context
directoryName

name of the directory being created

Throws

in case if IO failure