2024-05-28 06:48:23 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Mirea.Api.Endpoint.Common.Services;
|
|
|
|
|
|
|
|
|
|
public static class PathBuilder
|
|
|
|
|
{
|
2024-06-01 07:25:51 +03:00
|
|
|
|
public static bool IsDefaultPath => Environment.GetEnvironmentVariable("PATH_TO_SAVE") == null;
|
2024-05-28 06:48:23 +03:00
|
|
|
|
public static string PathToSave => Environment.GetEnvironmentVariable("PATH_TO_SAVE") ?? Directory.GetCurrentDirectory();
|
|
|
|
|
public static string Combine(params string[] paths) => Path.Combine([.. paths.Prepend(PathToSave)]);
|
|
|
|
|
}
|