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.