protected void DeleteFile(string path) { try { m_IStorage.DeleteFile(path); m_Logger.Writeln($"Delete File {path}"); } catch (UnauthorizedAccessException) { m_Logger.Writeln($"Delete Read only file File {path}"); m_IStorage.SetFileAttribute(path, FileAttributes.Normal); m_IStorage.DeleteFile(path); } catch (Exception ex) { m_Logger.Writeln($"**Exception while deleteing file: {path}\n{ex.Message}"); } }
internal async static Task <bool> DeleteFile(string path) { IStorageInterface si = DependencyService.Get <IStorageInterface>(); if (si != null) { await si.DeleteFile(path); return(true); } return(false); }