Commit b1b579fd authored by 黄奎's avatar 黄奎

页面修改

parent 8f863cc6
......@@ -61,8 +61,9 @@ namespace Edu.WebApi.Timers
string rootBook = AppDomain.CurrentDomain.BaseDirectory;
try
{
LogHelper.Write("开始清理临时文件");
DirectoryInfo dir = new DirectoryInfo(rootBook + "/upfile/temporary");
if (dir != null && dir.Exists)
{
DirectoryInfo[] dirArr = dir.GetDirectories();
foreach (DirectoryInfo item in dirArr)
{
......@@ -74,21 +75,23 @@ namespace Edu.WebApi.Timers
if (fi.CreationTime < DateTime.Now.AddDays(-1))
fi.Delete();
}
}
#region 导出文件的
DirectoryInfo QRdir = new DirectoryInfo(rootBook + "/upfile/ExportFile");
if (QRdir != null && QRdir.Exists)
{
foreach (FileInfo fi in QRdir.GetFiles())
{
if (fi.CreationTime < DateTime.Now.AddDays(-1))
fi.Delete();
}
}
#endregion
}
catch
{
LogHelper.Write("清理临时文件失败");
LogHelper.Write("清理临时文件失败_ClearFile");
}
Interlocked.Exchange(ref inTimer, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment