CaseInsensitiveFilePathHelper
using Microsoft.VisualBasic.CompilerServices;
using Relativity.DataExchange.Io;
using System;
namespace kCura.WinEDDS.Helpers
{
public class CaseInsensitiveFilePathHelper : IFilePathHelper
{
private readonly IFileSystem _fileSystem;
public CaseInsensitiveFilePathHelper(IFileSystem fileSystem)
{
_fileSystem = fileSystem;
}
public string GetExistingFilePath(string path)
{
if (!string.IsNullOrEmpty(path))
try {
return _fileSystem.File.Exists(path) ? path : null;
} catch (Exception ex) {
ProjectData.SetProjectError(ex);
Exception ex2 = ex;
string result = null;
ProjectData.ClearProjectError();
return result;
}
return null;
}
string IFilePathHelper.GetExistingFilePath(string path)
{
return this.GetExistingFilePath(path);
}
}
}