public static async void downloadAllFiles() {
var credentials = new NetworkCredential("USERNAME", "PASSWORD");
var webDavSession = new WebDavSession(@"https://cp.DOMAIN/remote.php/dav/files/USERNAME/", credentials);
var items = await webDavSession.ListAsync(@"APK-Test/");
foreach (var item in items)
{
//await webDavSession.DownloadFileAsync(item.Uri, STREAM);
WebClient myWebClient = new WebClient();
myWebClient.Credentials = credentials;
myWebClient.DownloadFile(item.Uri, @"C:\temp" + item.Name);
Console.WriteLine(item.Name);
}
}