/// <summary> /// Detects the steam config path. /// </summary> public static string GetConfigPath() { var SteamPath = SteamHelper.GetSteamPath(); if (string.IsNullOrEmpty(SteamPath) == false) { return(Path.Combine(SteamPath, "config")); } else { Log.Warning(typeof(SteamHelper), "SteamPath is empty."); } return(string.Empty); }
/// <summary> /// Detects the steam games library path. /// </summary> public static string GetLibraryPath() { var AppsPath = SteamHelper.GetSteamAppsPath(); if (string.IsNullOrEmpty(AppsPath) == false) { var AppsFiles = Directory.GetFiles(AppsPath); if (AppsFiles.Contains("libraryfolders.vdf", new PathEndingComparer())) { return(Path.Combine(AppsPath, "libraryfolders.vdf")); } else { Log.Warning(typeof(SteamHelper), "LibraryFolders.vdf don't exist."); } } else { Log.Warning(typeof(SteamHelper), "SteamApps is empty."); } return(string.Empty); }
/// <summary> /// Detects the steam apps path. /// </summary> public static string GetSteamAppsPath() { var SteamPath = SteamHelper.GetSteamPath(); if (string.IsNullOrEmpty(SteamPath) == false) { var SteamFiles = Directory.GetDirectories(SteamPath); if (SteamFiles.Contains("steamapps", new PathEndingComparer())) { return(Path.Combine(SteamPath, "steamapps")); } else { Log.Warning(typeof(SteamHelper), "SteamApps could not be detected."); } } else { Log.Warning(typeof(SteamHelper), "SteamPath is empty."); } return(string.Empty); }
/// <summary> /// Determines whether the specified game is installed.0 /// </summary> /// <param name="GameName">Name of the game.</param> public static bool IsGameInstalled(string GameName) { return(SteamHelper.GetInstalledGames().Contains(GameName)); }