/// <summary>
/// Wrapper around PathEnsure() that doesn't throw exceptions. Returns "" on error and prints an error message to _log
/// </summary>
/// <param name="basepath"></param>
/// <param name="chunks"></param>
/// <returns></returns>
public static string SafePathEnsure(string basepath, params string[] chunks)
{
try
{
//I'd rather do this here, than directly in the constructor or class definition.
//The file system loves to throw exceptions, and I'd rather see em than a app 'exit'!
//In Soviet Russia, computer throws things at YOU!!
return(FileUtilities.PathEnsure(basepath, chunks));
}
catch (Exception ex)
{
_log.Error("Error constructing path", ex);
}
return(string.Empty);
}