feat: add wrapper for Path.Combine with default path
This commit is contained in:
parent
817f9d2308
commit
d7299a1afd
11
Endpoint/Common/Services/PathBuilder.cs
Normal file
11
Endpoint/Common/Services/PathBuilder.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Endpoint.Common.Services;
|
||||||
|
|
||||||
|
public static class PathBuilder
|
||||||
|
{
|
||||||
|
public static string PathToSave => Environment.GetEnvironmentVariable("PATH_TO_SAVE") ?? Directory.GetCurrentDirectory();
|
||||||
|
public static string Combine(params string[] paths) => Path.Combine([.. paths.Prepend(PathToSave)]);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user