Files
VRCX/Dotnet/AppApi/Common/VrcConfigFile.cs
2025-01-26 06:11:35 +13:00

28 lines
709 B
C#

using System;
using System.IO;
namespace VRCX
{
public partial class AppApi
{
public string ReadConfigFile()
{
var path = GetVRChatAppDataLocation();
var configFile = Path.Join(path, "config.json");
if (!Directory.Exists(path) || !File.Exists(configFile))
{
return string.Empty;
}
var json = File.ReadAllText(configFile);
return json;
}
public void WriteConfigFile(string json)
{
var path = GetVRChatAppDataLocation();
var configFile = Path.Join(path, "config.json");
File.WriteAllText(configFile, json);
}
}
}