Добавьте файлы проекта.

This commit is contained in:
2025-12-07 08:52:05 +03:00
parent 95344cd7a7
commit 226b6b6b21
118 changed files with 5249 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
using SQLLinter.Core.Interfaces;
namespace SQLLinter.Infrastructure.Parser
{
public class FileSystemWrapper : IFileSystemWrapper
{
public bool FileExists(string path)
{
path = RemoveQuotes(path);
return File.Exists(path);
}
public bool PathIsValidForLint(string path)
{
path = RemoveQuotes(path);
if (!File.Exists(path))
{
return Directory.Exists(path) || PathContainsWildCard(path);
}
return true;
}
private static bool PathContainsWildCard(string filePath)
{
return filePath.Contains("*") || filePath.Contains("?");
}
private string RemoveQuotes(string path)
{
return path.Replace("\"", string.Empty);
}
public string CombinePath(params string[] paths)
{
return Path.Combine(paths);
}
}
}