downloadFileToPath

fun downloadFileToPath(downloadDirectoryAbsolutePath: String, remoteFileUrl: String, outputFilename: String, extension: String? = null): Pair<File, HttpHeaders>

Return

The downloaded file

Parameters

downloadDirectoryAbsolutePath

the absolute file path to the download directory. Must begin with "/".

remoteFileUrl

the remote url of the file to be downloaded

outputFilename

filename of the end result file with no file extension

extension

file extension (optional).

Throws

if file could not be downloaded