title: How to use IFileInfo to delete a file in ASP.NET Core
body: <p>I have read that it's better I use <code>IFileProvider</code> for managing files in ASP.NET Core <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/file-providers?view=aspnetcore-2.1" rel="nofollow noreferrer">Microsoft Documentation</a>. but, if I use <code>GetFileInfo()</code> method I will have access to <code>IFileInfo</code> and it just provides some methods for reading files! </p>
  
  <p>How can I delete a file?</p>