45 lines
664 B
C#
45 lines
664 B
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace SupportClasses
|
|
{
|
|
public static class _Directory
|
|
{
|
|
public static char Slash
|
|
{
|
|
get
|
|
{
|
|
var p = (int)Environment.OSVersion.Platform;
|
|
if ((p == 4) || (p == 6) || (p == 128))
|
|
return '/';
|
|
else
|
|
return '\\';
|
|
}
|
|
}
|
|
|
|
private static string tempDir = null;
|
|
public static string TempDir
|
|
{
|
|
get
|
|
{
|
|
if (string.IsNullOrEmpty(tempDir))
|
|
{
|
|
tempDir = Directory.GetCurrentDirectory() + Slash + "temp";
|
|
Directory.CreateDirectory(tempDir);
|
|
}
|
|
return tempDir;
|
|
}
|
|
set
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
public static bool ClearTempDir(DateTime dtCreation)
|
|
{
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|