public static bool Delete(ItemType itemType, string source) { if (itemType == ItemType.File) { return(FileHelper.FileDelete(source)); } else { return(FileHelper.FolderDelete(source)); } }
private UpdateLocalVersion InternalProcessDelete(GetOperation operation, ProcessType processType) { var path = operation.SourceLocalItem; if (processType == ProcessType.Delete) { try { if (operation.ItemType == ItemType.File) { FileHelper.FileDelete(path); } else { FileHelper.FolderDelete(path); } } catch { LoggingService.Log(MonoDevelop.Core.Logging.LogLevel.Info, "Can not delete path:" + path); } } return(new UpdateLocalVersion(operation.ItemId, null, operation.VersionServer)); }