FileUtil.cs 520 B

1234567891011121314151617181920212223242526
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace FrmStandAloneMetering.Utils
  8. {
  9. class FileUtil
  10. {
  11. public static void DeleteFile(string fileUrl)
  12. {
  13. try
  14. {
  15. if (File.Exists(fileUrl))
  16. {
  17. File.Delete(fileUrl); //删除指定文件
  18. }
  19. }
  20. catch
  21. {
  22. }
  23. }
  24. }
  25. }