mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
testing markdown storage and retrieval
This commit is contained in:
17
Management/Services/Files/FileConfiguration.cs
Normal file
17
Management/Services/Files/FileConfiguration.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Management.Services;
|
||||
|
||||
public class FileConfiguration
|
||||
{
|
||||
|
||||
public static string GetBasePath()
|
||||
{
|
||||
string? storageDirectory = Environment.GetEnvironmentVariable("storageDirectory");
|
||||
var basePath = storageDirectory ?? Path.GetFullPath("../storage");
|
||||
|
||||
if (!Directory.Exists(basePath))
|
||||
throw new Exception("storage folder not found");
|
||||
|
||||
return basePath;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user