mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
18 lines
412 B
C#
18 lines
412 B
C#
using Management.Services;
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
public class FileConfiguration(IConfiguration config)
|
|
{
|
|
public string GetBasePath()
|
|
{
|
|
string? storageDirectory = config["storageDirectory"];
|
|
var basePath = storageDirectory ?? Path.GetFullPath("../storage");
|
|
|
|
if (!Directory.Exists(basePath))
|
|
throw new Exception("storage folder not found");
|
|
|
|
return basePath;
|
|
|
|
}
|
|
}
|