// ***** Tools
public static string GetAppLocalDir()
{
string appDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string sonyDir = appDataDir + "//ace";
CheckAndCreateDir(sonyDir);
string fx01Dir = sonyDir + "//ddeww01";
CheckAndCreateDir(fx01Dir);
string app1Dir = fx01Dir + "//2ss1";
CheckAndCreateDir(app1Dir);
return app1Dir;
}
public static void CheckAndCreateDir(string pcPath)
{
try
{
if (pcPath != null)
{
//string dir = Path.GetDirectoryName(pcPath);
if (Directory.Exists(pcPath) == false)
{
Directory.CreateDirectory(pcPath);
}
}
}
catch
{
MessageBox.Show("Can not create a directory for log", "Error");
}
}
.