Пример #1
0
        public static async Task GetFilesFromCloud()
        {
            await OneDriveConnectionHelper.GetAppFolder();

            var list = OneDriveConnectionHelper.GetODItemsFromAppFolder();

            foreach (var odItem in list)
            {
                _odAppFolderItems.Add(odItem.Name, odItem);
            }
        }
Пример #2
0
 public static async Task PushModifiedItemsToTheCLoud()
 {
     foreach (var workingDirFile in _workingDirFiles)
     {
         if (workingDirFile.Value.GetBasicPropertiesAsync().GetResults().DateModified >
             _odAppFolderItems[workingDirFile.Key].LastModifiedDateTime)
         {
             await OneDriveConnectionHelper.CreateFile(OneDriveConnectionHelper.AppFolder, workingDirFile.Value.Name,
                                                       await workingDirFile.Value.OpenStreamForReadAsync());
         }
     }
 }