public async Task DeleteAll(string folderName, bool recurse) { var files = await _applicationDataHelper.GetAllFilesInFolder(folderName, recurse); if (files == null) { return; } foreach (var item in files) { await _applicationDataHelper.DeleteFile(item); } }
public static void DeleteFile(string fileName) { Instance.DeleteFile(fileName); }
async void _doThings() { var fileName = "something\\someting\\\\SomethuingElse\\tes.dat"; await _storage.SaveString(fileName, "Testing123"); var fileData = await _storage.LoadString(fileName); var fileExists = await _storage.FileExists(fileName); await _storage.DeleteFile(fileName); var fileExistsAFter = await _storage.FileExists(fileName); int count = 0; await Task.Delay(4000); DynamicViewModel = CreateContentModel <FirstDynamicViewModel>(); await Task.Delay(2000); DynamicViewModel = null; return; while (count < 3) { await Task.Delay(3000); if (DynamicViewModel is FirstDynamicViewModel) { DynamicViewModel = CreateContentModel <SecondDynamicViewModel>(); } else { DynamicViewModel = CreateContentModel <FirstDynamicViewModel>(); } count++; } DynamicViewModel = null; count = 0; while (count < 3) { await Task.Delay(3000); if (DynamicViewModel is FirstDynamicViewModel) { DynamicViewModel = CreateContentModel <SecondDynamicViewModel>(); } else { DynamicViewModel = CreateContentModel <FirstDynamicViewModel>(); } count++; } DynamicViewModel = null; }