FileHelper.cs 521 B

12345678910111213141516171819202122
  1. using System.IO;
  2. namespace Abp.IO
  3. {
  4. /// <summary>
  5. /// A helper class for File operations.
  6. /// </summary>
  7. public static class FileHelper
  8. {
  9. /// <summary>
  10. /// Checks and deletes given file if it does exists.
  11. /// </summary>
  12. /// <param name="filePath">Path of the file</param>
  13. public static void DeleteIfExists(string filePath)
  14. {
  15. if (File.Exists(filePath))
  16. {
  17. File.Delete(filePath);
  18. }
  19. }
  20. }
  21. }