namespace CommanderApp.Services; public class PathHelper : IPathHelper { public string GetUserHomePath() { #if WINDOWS return Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); #else return Environment.GetFolderPath(Environment.SpecialFolder.Personal); #endif } public string GetRootPath() { #if WINDOWS return Path.GetPathRoot(Environment.SystemDirectory) ?? "C:\\"; #else return "/"; #endif } public string CombinePaths(params string[] paths) => Path.Combine(paths); public string GetFileName(string path) => Path.GetFileName(path); public string GetDirectoryName(string path) => Path.GetDirectoryName(path) ?? string.Empty; }