/
bulkin
/
BModder
Обзор
Документация
Войти
/
bulkin
/
BModder
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
BModder.UI/FileManager.cs
41 строка
1 KB
bulka-s
fix bugs
16 окт 2025, 18:54
16 окт 2025, 18:54
065decf
Код
Авторство
О чём код?
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BModder.UI { public static class FileManager { public static bool CheckPath(string path, string targetFile) { path = path.Trim(); if (string.IsNullOrWhiteSpace(path)) { LogHelper.WriteLog($"Invalid path. (empty)", LogHelper.LogType.Error); return false; } if (!Directory.Exists(path)) { LogHelper.WriteLog($"Path not found. {path}", LogHelper.LogType.Error); return false; } if (targetFile != null) { string fullFile = System.IO.Path.Combine(path, targetFile); if (!File.Exists(fullFile)) { LogHelper.WriteLog($"File not found. {fullFile}", LogHelper.LogType.Error); return false; } } return true; } } }