This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
UpTool2/Installer/PathTool.cs

19 lines
613 B
C#
Raw Normal View History

2020-03-16 15:53:14 +01:00
using System;
using System.IO;
using System.Linq;
namespace Installer
{
internal static class PathTool
{
public static string Dir =>
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "UpTool2");
2020-03-16 15:53:14 +01:00
public static string TempPath => GetRelative("tmp");
public static string AppsPath => GetRelative("Apps");
2020-03-16 15:53:14 +01:00
public static string InfoXml => GetRelative("info.xml");
public static string GetRelative(params string[] segments) =>
System.IO.Path.Combine(new[] {Dir}.Concat(segments).ToArray());
2020-03-16 15:53:14 +01:00
}
}