private async Task<string> DeleteFileHelper(string fileName)
{
try
{
StorageFolder appFolder = ApplicationData.Current.LocalFolder;
StorageFile file = await appFolder.GetFileAsync(fileName);
await file.DeleteAsync();
return "success";
}
catch (Exception ex)
{
return "fail";
}
}The following code snippet deletes the given file from the Application local folder.This code returns 'success' if it deletes the file successfully and returns 'fail' if not.
