I'm writing a simple mac os (10.11) command line app in Swift to download a file from a valid remote URL and I'd like to show the % of file downloaded in place on the console.
It would start with:
0% of 10Mb file downloaded
Then when I have some percentage of the file downloaded, the above line would get replaced with:
18% of 10Mb file downloaded
Finally, when it finishes, the string gets replaced in line with:
100% of 10Mb file downloaded
print(..)
will keep append to existing text - is there another function that will do what I need?