public ActionResult Delete() { string filePath = Request.Form["filePath"].ToString(); try { FileExplorerModel.DeleteFromDisk(filePath, false); } catch (Exception e) { return(Json(new ResultMessage(1, e.Message))); } return(Json(new ResultMessage())); }
static void Main(string[] args) { FileExplorerModel model = new FileExplorerModel("c:\\"); FileExplorerModel.DeleteFromDisk("c:\\a.cfg", false); }