public void Delete(string id) { string dirPath = env.ContentRootPath; dirPath = Path.Combine(dirPath, "cronItems", "v1"); var writ = new Writables(dirPath); writ.DeleteFile(id); }
public void Delete(string id, [FromServices] IHostingEnvironment hosting) { string dir = Path.Combine(hosting.ContentRootPath, "definitionHttpEndpoints"); if (id != null) { new Writables(dir).DeleteFile(id); } else { var w = new Writables(dir); var files = this.Get(hosting); files.ToList().ForEach(it => w.DeleteFile(id)); } Program.Shutdown(); }