23 lines
566 B
C#
23 lines
566 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace tsCorreos
|
|
{
|
|
public class Utilidades
|
|
{
|
|
public static string ObtieneDirectorioAleatorio()
|
|
{
|
|
string sDir = System.IO.Path.GetTempPath() + System.IO.Path.GetRandomFileName();
|
|
|
|
while (System.IO.Directory.Exists(sDir))
|
|
{
|
|
sDir = System.IO.Path.GetTempPath() + "\\" + System.IO.Path.GetRandomFileName();
|
|
}
|
|
|
|
System.IO.Directory.CreateDirectory(sDir);
|
|
return sDir;
|
|
}
|
|
}
|
|
}
|