/
Paths.cs
43 lines (34 loc) · 1.21 KB
/
Paths.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
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.IO;
namespace Azazel.FileSystem {
public class Paths {
public static Paths Instance = new Paths();
private Paths() {}
public string Db4o {
get { return AppDataFile("Db4o"); }
}
public string Folders {
get { return AppDataFile("folders.xml"); }
}
public string History {
get { return AppDataFile("history.xml"); }
}
public string ExecutedCommands {
get { return AppDataFile("executedCommands.xml"); }
}
public string Exception {
get { return AppDataFile("exception.txt"); }
}
public string AppHotkeys {
get { return AppDataFile("AppHotkeys.xml"); }
}
private static string AppDataFile(string fileName) {
return Combine(Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Azazel", fileName));
}
public static string Combine(params string[] paths) {
string result = "";
for (int i = 0; i < paths.Length; i++) result = Path.Combine(result, paths[i]);
return result;
}
}
}