-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPathUtils.cs
More file actions
36 lines (33 loc) · 953 Bytes
/
PathUtils.cs
File metadata and controls
36 lines (33 loc) · 953 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FNF_Launcher
{
public static class PathUtils
{
public static string ApplicationDirectory
{
get
{
// get it in a good way
return Directory.GetParent(Environment.GetCommandLineArgs()[0]).FullName;
}
}
/// <summary>
/// Appends <paramref name="path"/> to the current working directory
/// </summary>
/// <param name="path"></param>
/// <returns>An absolute version of <paramref name="path"/></returns>
public static string Absolute(string path)
{
return $"{ApplicationDirectory}/{path}";
}
//public static string GetParent(string path)
//{
// string[ compons = path.Split('/');
// return ;
//}
}
}