-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathClient.cs
32 lines (28 loc) · 832 Bytes
/
Client.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Windows.Forms;
namespace Launcher
{
class Client
{
public static void updateRealmlist(string directoryPath, Server server)
{
string realmlistPath = ClientHelper.realmlistPath(server);
if (!File.Exists(realmlistPath)) return;
File.Delete(realmlistPath);
using (StreamWriter file = new StreamWriter(realmlistPath, true))
{
file.WriteLine(server.realmlist);
}
}
public static void clearCache(string directoryPath)
{
if (Directory.Exists(directoryPath))
DirectoryHelper.clearDirectory(directoryPath);
}
}
}