download_file

Download source file to destination file. This function is usefull in web assembly when you want to download some resources from your web site to the web assembly virtual file system. For example if you have 'image.png' in the same directory on the web site as you .wasm file you can download it like download_file('image.png', 'image.png', callback()). When download is finished you callback function will be called with downloaded file name as an argument.

Arguments

  1. String source file url
  2. String destination file url
  3. One argument callback function eg. fn(arg) defined elsewhere in the source file

Output

Boolean