mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-13 11:53:51 +02:00
28 lines
709 B
C#
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);
|
|
}
|
|
}
|
|
} |