Downloading a file and showing progress via curl.
Vladimir Panteleev
thecybershadow.lists at gmail.com
Tue Aug 20 16:55:37 UTC 2019
On Tuesday, 20 August 2019 at 11:51:03 UTC, Daniel Kozak wrote:
> For that you can use https://dlang.org/phobos/std_file#append
Don't do that. It will reopen and close the file on every
received chunk. Not only is it slow, but if the file is
renamed/moved/deleted while the download is occurring, the file
will be corrupted. The same will happen if you run the program
twice, if you don't clean up.
The correct way is to open a File once, then use rawWrite for
every received chunk.
More information about the Digitalmars-d-learn
mailing list