Updated Dependency to accept DependencyName as parameter

This commit is contained in:
2024-06-07 21:01:10 +03:00
parent 1a5f0cbede
commit 9a8ddb5388
14 changed files with 152 additions and 83 deletions

View File

@@ -48,7 +48,10 @@ public static class ServerCom
using (var client = new HttpClient())
{
client.Timeout = TimeSpan.FromMinutes(5);
if(Directory.Exists(Path.GetDirectoryName(location)) == false)
{
Directory.CreateDirectory(Path.GetDirectoryName(location));
}
using (var file = new FileStream(location, FileMode.Create, FileAccess.Write, FileShare.None))
{
await client.DownloadFileAsync(URL, file, progress, downloadedBytes);