ASCU_ALL/SupportClasses/Directory.cs

45 lines
664 B
C#
Raw Normal View History

2020-09-04 12:49:15 +05:00
using System;
using System.IO;
namespace SupportClasses
{
2020-11-18 16:56:28 +05:00
public static class _Directory
2020-09-04 12:49:15 +05:00
{
public static char Slash
{
get
{
2020-11-18 16:56:28 +05:00
var p = (int)Environment.OSVersion.Platform;
if ((p == 4) || (p == 6) || (p == 128))
2020-09-04 12:49:15 +05:00
return '/';
else
return '\\';
}
}
private static string tempDir = null;
public static string TempDir
{
get
{
2020-11-18 16:56:28 +05:00
if (string.IsNullOrEmpty(tempDir))
2020-09-04 12:49:15 +05:00
{
2020-11-18 16:56:28 +05:00
tempDir = Directory.GetCurrentDirectory() + Slash + "temp";
2020-09-04 12:49:15 +05:00
Directory.CreateDirectory(tempDir);
}
return tempDir;
}
set
{
}
}
public static bool ClearTempDir(DateTime dtCreation)
{
return true;
}
}
}