FileUtils

object FileUtils

Contains helper methods for working with files and directories

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun ensureDirExists(directoryPath: String?): Boolean
Link copied to clipboard
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.

Link copied to clipboard

Returns external cache directory with provided name (creates if needed). On failure shows toast message.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun getFilesDirOrShowError(parentDirPath: String?, directoryName: String?): File

Returns directory with provided path (creates if needed). On failure shows toast message.

Link copied to clipboard