Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PathService.cs
Go to the documentation of this file.
1using System;
3using System.IO;
5
6namespace ReLogic.OS.Linux;
7
8internal class PathService : ReLogic.OS.Base.PathService
9{
10 public override string GetStoragePath()
11 {
12 string text = Environment.GetEnvironmentVariable("XDG_DATA_HOME");
13 if (string.IsNullOrEmpty(text))
14 {
16 if (string.IsNullOrEmpty(text))
17 {
18 return ".";
19 }
20 text += "/.local/share";
21 }
22 return text;
23 }
24
25 public override void OpenURL(string url)
26 {
27 Process.Start("xdg-open", "\"" + url + "\"");
28 }
29
30 public override bool MoveToRecycleBin(string path)
31 {
32 File.Delete(path);
33 return true;
34 }
35}
override void OpenURL(string url)
override string GetStoragePath()
override bool MoveToRecycleBin(string path)
static ? string GetEnvironmentVariable(string variable)
static void Delete(string path)
Definition File.cs:88