downloadFile

fun downloadFile(file: File, downloadURL: URL): Boolean

Download the file from the specified URL to the specified destination. The destination should end in a valid filename. Any directories up to the specified file will be created.

Return

true if the file was created.

Author

Griefed

Parameters

file

The destination where the file should be stored. Must include the filename as well. Examples:

  • /tmp/some_folder/foo.bar

  • C:/temp/some_folder/bar.foo

downloadURL

The URL to the file you want to download.