public void DeleteLocalFile(Microsoft.WindowsAzure.MobileServices.Files.MobileServiceFile file)
        {
            string localPath = GetLocalFilePath(file.ParentId, file.Name);

            if (File.Exists(localPath))
            {
                File.Delete(localPath);
            }
        }
 public async Task ProcessFileSynchronizationAction(Microsoft.WindowsAzure.MobileServices.Files.MobileServiceFile file, FileSynchronizationAction action)
 {
     if (action == FileSynchronizationAction.Delete)
     {
         FileHelper.DeleteLocalFile(file);
     }
     else // Create or update. We're aggressively downloading all files.
     {
         await this.todoItemManager.DownloadFileAsync(file);
     }
 }
        public static async Task DeleteLocalFileAsync(Microsoft.WindowsAzure.MobileServices.Files.MobileServiceFile fileName)
        {
            string localPath = await GetLocalFilePathAsync(fileName.ParentId, fileName.Name);

            var checkExists = await FileSystem.Current.LocalStorage.CheckExistsAsync(localPath);

            if (checkExists == ExistenceCheckResult.FileExists)
            {
                var file = await FileSystem.Current.LocalStorage.GetFileAsync(localPath);

                await file.DeleteAsync();
            }
        }
Exemple #4
0
        public static async Task DeleteLocalFileAsync(Microsoft.WindowsAzure.MobileServices.Files.MobileServiceFile fileName, string dataFilesPath)
        {
            string localPath = await GetLocalFilePathAsync(fileName.ParentId, fileName.Name, dataFilesPath);

            await DeleteLocalFileAsync(localPath);
        }