Exemplo n.º 1
0
        private void DownloadRecursion(RemoteDriveItem item)
        {
            RemoteDriveItem downloaded = this.ServiceClient.ReadItem(item.FullPath);

            downloaded.Localize(this.PathResolver).CreateOrUpdate();
            if (item.IsDirectory())
            {
                foreach (RemoteDriveItem child in downloaded.Children())
                {
                    this.DownloadRecursion(child);
                }
            }
        }
Exemplo n.º 2
0
 private void DownloadThread(string path)
 {
     try
     {
         RemoteDriveItem item = this.ServiceClient.ReadItem(path);
         if (this.PathResolver.UserRoot != item.Name)
         {
             item.Localize(this.PathResolver).CreateOrUpdate();
         }
         if (item.IsDirectory())
         {
             foreach (RemoteDriveItem child in item.Children())
             {
                 this.DownloadRecursion(child);
             }
         }
         this.InvokeRemoteDriveEvent(RemoteDriveEventType.DownloadOk);
     }
     catch (Exception e)
     {
         this.InvokeRemoteDriveEvent(RemoteDriveEventType.DownloadFail, null, null, e);
     }
 }