private void EnsureDirectoriesExist()
{
try
{
_faxPath.Refresh();
_archivePath.Refresh();
_analysisPath.Refresh();
if (!_faxPath.Exists)
{
_faxPath.Create();
Logger.Instance.LogFormat(LogType.Trace, this, Properties.Resources.CreatedRequiredDirectory, _faxPath.FullName);
}
if (!_archivePath.Exists)
{
Logger.Instance.LogFormat(LogType.Trace, this, Properties.Resources.CreatedRequiredDirectory, _archivePath.FullName);
_archivePath.Create();
}
if (!_analysisPath.Exists)
{
Logger.Instance.LogFormat(LogType.Trace, this, Properties.Resources.CreatedRequiredDirectory, _analysisPath.FullName);
_analysisPath.Create();
}
}
catch (IOException)
{
Logger.Instance.LogFormat(LogType.Warning, this, Properties.Resources.ErrorCreatingRequiredDirectory);
}
}