public static Boolean DeleteDirectory(string _targetFolder)
{
try
{
if (Directory.Exists(_targetFolder))
{
Directory.Delete(_targetFolder, true);
}
return true;
}
catch (Exception ex)
{
logger.LogError("Library.Functions.DeleteDirectory(string):Target:" + _targetFolder + ": Exception: " + ex.ToString());
return false;
}
}
{
try
{
if (Directory.Exists(_targetFolder))
{
Directory.Delete(_targetFolder, true);
}
return true;
}
catch (Exception ex)
{
logger.LogError("Library.Functions.DeleteDirectory(string):Target:" + _targetFolder + ": Exception: " + ex.ToString());
return false;
}
}
No comments:
Post a Comment