android-components / / DownloadUtils


object DownloadUtils (source)


Name Summary
guessFileName fun guessFileName(contentDisposition: String?, destinationDirectory: String?, url: String?, mimeType: String?): String
Guess the name of the file that should be downloaded.
uniqueFileName fun uniqueFileName(directory: File, fileName: String): String
Checks if the file exists so as not to overwrite one already in the destination directory

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.