WebClient DownloadFileAsync File Exists
-
12-09-2020 - |
Question
Is there a recommended method for using DownloadFileAsyc and determining if the file exists? It seems that the only way I can tell is on the DownloadCompleted event the error property has a 404 error in it, and the there's a file created that is 0 bytes.
It would be nice to have a more deterministic method.
Solution
Chris T had the right answer. (or at least good enough for me).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow