From b7e39b59fd0fc7b5610ebff29035bf622079e0d8 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 5 Oct 2022 20:45:21 +0800 Subject: refactor: Change file structure --- server/src/Data/Models/AppPath.cs | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 server/src/Data/Models/AppPath.cs (limited to 'server/src/Data/Models/AppPath.cs') diff --git a/server/src/Data/Models/AppPath.cs b/server/src/Data/Models/AppPath.cs deleted file mode 100644 index e47e48c..0000000 --- a/server/src/Data/Models/AppPath.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace IOL.GreatOffice.Api.Data.Models; - -public sealed record AppPath -{ - public string HostPath { get; init; } - public string WebPath { get; init; } - - public string GetHostPathForFilename(string filename, string fallback = "") { - if (filename.IsNullOrWhiteSpace()) { - return fallback; - } - - return Path.Combine(HostPath, filename); - } - - public string GetWebPathForFilename(string filename, string fallback = "") { - if (filename.IsNullOrWhiteSpace()) { - return fallback; - } - - return Path.Combine(WebPath, filename); - } -} -- cgit v1.3