public static string GetDataDir(Type t)
{
string c = t.FullName;
c = c.Replace("Aspose.Cells.Examples.CSharp.", "");
c = c.Replace('.', Path.DirectorySeparatorChar);
string p = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "Data", c));
p += Path.DirectorySeparatorChar;
if (Directory.Exists(p))
{
Console.WriteLine("Using Data Dir {0}", p);
}
else
{
Directory.CreateDirectory(p);
Console.WriteLine("Created Data Dir {0}", p);
}
return p;
}
}