FileUtil.cs 457 B

12345678910111213141516171819202122
  1. using Furion;
  2. using System.IO;
  3. namespace YBEE.EQM.Core;
  4. public static class FileUtil
  5. {
  6. /// <summary>
  7. /// 获取临时目录
  8. /// </summary>
  9. /// <returns></returns>
  10. public static string GetTempFileRoot()
  11. {
  12. string r = Path.Combine(App.WebHostEnvironment.ContentRootPath, CommonConst.TEMP_FILE_ROOT);
  13. if (!Directory.Exists(r))
  14. {
  15. Directory.CreateDirectory(r);
  16. }
  17. return r;
  18. }
  19. }