private static void DeleteRecordFile() { string recordFilePath = RecorderHelper.GetRecordFilePath(); if (!string.IsNullOrWhiteSpace(recordFilePath)) { if (System.IO.File.Exists(recordFilePath)) { System.IO.File.Delete(recordFilePath); } } }
private static MethodResult SaveRecordFile(string microCourseName) { MethodResult mr = new MethodResult(); mr.Status = 0; mr.Message = "sucess"; string recordFullFileName = RecorderHelper.GetRecordFilePath(); if (string.IsNullOrWhiteSpace(recordFullFileName)) { mr.Status = 2; mr.Message = "recordFullFileName is empty"; return(mr); } if (!AppUtils.FileExists(recordFullFileName)) { mr.Status = 3; mr.Message = string.Format("{0} is not exist", recordFullFileName); return(mr); } try { string recordVideoPath = AppUtils.GetRecordVideoPath(); AppUtils.MoveFile(recordFullFileName, System.IO.Path.Combine(recordVideoPath, RecorderHelper.StartRecordTime.ToString("微课-yyyyMMddHHmmss") + ".mp4")); } catch (Exception ex) { mr.Status = 99; mr.Message = ex.ToString(); //Log.Write(ex); } finally { } return(mr); }