downloadAndReplaceFile

fun downloadAndReplaceFile(fileDestination: File, downloadURL: URL): Boolean

Download the file from the specified URL to the specified destination, replacing the file if it already exists. The destination should end in a valid filename. Any directories up to the specified file will be created.

Return

Boolean. Returns true if the file could be found on the hosts' filesystem.

Author

Griefed

Parameters

fileDestination

The file to store the web-resource in. Examples:

  • /tmp/some_folder/foo.bar

  • C:/temp/some_folder/bar.foo

downloadURL

The URL to the file you want to download.