addin option to get BS Folder from Steam
This commit is contained in:
42
controller/helper/getNormalBeatSaberFolder.cs
Normal file
42
controller/helper/getNormalBeatSaberFolder.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using Gameloop.Vdf;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BeatSaber_Versions.controller.helper
|
||||
{
|
||||
internal class getNormalBeatSaberFolder
|
||||
{
|
||||
public static String getBSFolder()
|
||||
{
|
||||
String f = @"C:\Program Files (x86)\Steam\steamapps\libraryfolders.vdf";
|
||||
|
||||
if (File.Exists(f))
|
||||
{
|
||||
dynamic steam = VdfConvert.Deserialize(File.ReadAllText(f));
|
||||
dynamic libs = steam.Value;
|
||||
|
||||
foreach (dynamic lib in libs)
|
||||
{
|
||||
Console.Write(lib);
|
||||
foreach(dynamic opt in lib)
|
||||
{
|
||||
Console.Write(opt);
|
||||
}
|
||||
|
||||
dynamic games = lib.Value[lib.Value.Count-1];
|
||||
foreach(dynamic game in games)
|
||||
{
|
||||
Console.Write(game);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user