Beispiel #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);
                }
            }
        }
Beispiel #2
0
 private void CreateRemoteRecursion(RemoteDriveItem item)
 {
     if (item.IsFile())
     {
         item.GetBinary();
     }
     this.ServiceClient.CreateItem(item.Load());
     if (item.IsDirectory())
     {
         foreach (RemoteDriveItem child in item.Children())
         {
             this.CreateRemoteRecursion(child);
         }
     }
 }
Beispiel #3
0
 private void CreateRemoteThread(RemoteDriveItem item)
 {
     try
     {
         this.ServiceClient.CreateItem(item.Load());
         if (item.IsDirectory())
         {
             foreach (RemoteDriveItem child in item.Children())
             {
                 this.CreateRemoteRecursion(child);
             }
         }
         this.InvokeRemoteDriveEvent(RemoteDriveEventType.CreateRemoteOk);
     }
     catch (Exception e)
     {
         this.InvokeRemoteDriveEvent(RemoteDriveEventType.CreateRemoteFail, null, null, e);
     }
 }
Beispiel #4
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);
     }
 }